You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by joshua rosenblatt <jr...@hotmail.com> on 2003/05/14 20:17:16 UTC
aggregate data / dynamic form / DynaForm
I have a DTO that consists of some get/set attributes and then a sorted
collection of beans each with soem get/set attributes that I want to
dsiplay. I need to write these out to a dynamically sized form and let the
user edit the values before rolling it back up. There is other data already
on the page.
I'm already using a DynaActionForm so i would like to stick with that but
recognize that they dont' work with arrays . . . so i don't see any
alternative but to switch to a regular action form that would have getter
setters that take arrays this would transform the beans from a single array
of objects to a set of arrays of properties and i'd have to create
transformation logic in the ActionForm. Is this the only way to go? Also
wouldn't there be problems with association? I would need index 0 of each
of the arrays to correspond to a row of the form, would that be the case.
Any thoughts on this are really apreciated.
Josh
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: aggregate data / dynamic form / DynaForm
Posted by Vic Cekvenich <vc...@baseBeans.com>.
joshua rosenblatt wrote:
> I have a DTO that consists of some get/set attributes and then a
> sorted collection of beans each with soem get/set attributes that I
> want to dsiplay. I need to write these out to a dynamically sized
> form and let the user edit the values before rolling it back up.
> There is other data already on the page.
>
> I'm already using a DynaActionForm so i would like to stick with that
> but recognize that they dont' work with arrays . . . so i don't see
> any alternative but to switch to a regular action form that would have
> getter setters that take arrays this would transform the beans from a
> single array of objects to a set of arrays of properties and i'd have
> to create transformation logic in the ActionForm. Is this the only
> way to go?
I find it "good" to have a formBean implement a collction, it makes
things easier for more complex situations. You can then just do
bean.next and c:for each and logic iterate work just fine with
validation, nesting multirow, etc.
> Also wouldn't there be problems with association? I would need index
> 0 of each of the arrays to correspond to a row of the form, would that
> be the case.
>
> Any thoughts on this are really apreciated.
>
> Josh
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
--
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA
Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North East.
Open Source <a href ="baseBeans.com">Content Management</a> basicPortal sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org