I'm questioning my current design practice regarding Struts forms.

Until now, I tend to store all client data in the Struts form and I
avoid using other request attributes or session attributes.

But, this approach seems limited when I need to display a collection of
objects that are "very polymorphic". Let's say I need to display a
collection of instances of different classes A1, A2 and A3, that all
extend the same parent class A. A1, A2 and A3 have a very limited number
of common properties (described in class A).


If I store the collection of A's in the Struts form (as in indexed
property), I do not know to to code a <logic:iterate> tag in the JSP in
order to make sure that I won't loose data from request to request (what
preoperty attribute can I write for this tag ?) :
<logic:iterate  name="myForm"
                property="collection_of_As"
                id="A" 
                type="WHAT SHOULD I WRITE FOR THIS ATTRIBUTE">

Therefore, in this case, I want to use a session attribute to store the
collection of As. Of course I won't loose client data from request to
request (action forward).

What is your point of view regarding this matter ?

Is it OK using session attributes (performance, memory, etc. ), even if
you make sure session attributes are removed when no more needed ?

Fred


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to