You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Affan Qureshi <qu...@etilize.com> on 2002/12/27 12:02:48 UTC

Simultaneous editing of a session-scoped ActionForm bean

I have a session scoped ActionForm bean "productBean" which has a nested
hierarchy of objects. If the user opens two windows for the same page for
different products the bean in the session gets overwritten and may cause
corruption of data. One way is to error out if the user has a different
product on the screen than the bean in the session (by comparing the
productIds). But I wanted to maybe define multiple beans with different
bean-names by appending the productId with the bean name. In that case the
form should lookup the bean identified by a dynamic label rather than the
one defined in struts-confg.xml. Is this possible? Can I instantiate
multiple instances of a form bean even if declared only once in
struts-config.xml? Or do I have to bypass the struts-config declaration
altogether somhow?

Has anyone done this in a better way? Any best practices in this case?

Thanks a lot.

Affan


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>