Yan Zhu wrote:
>     Let's take an example, let's say I have a form with 50 fields filled with
> text, combo
> boxes and what have you html controls up there. Currently I am handling that in
> this
> fashion: I name the controls smartly for those ones need to be updated, for
> example,
> fldName, fldAddress, etc, by the time of the update, I simply loop through all
> controls
> with fld prefix, and update a xml tree based on the values.
> 
>     So what's so good about this approach? well, I never have to make any changes
> to
> my underlying objects like those formobjects struts are so fond of. I can add any
> fields
> on the form as I wish, and my xml tree would grow accordingly. I perseve my state
> 
> in the xml tree.
> 
>     Maybe Struts addresses this problem in a different way?
> 
> yan

You can continue to use this approach, if you like. The request is
passed to the Action perform method, and if you prefer to loop through
the request you can. 

The ActionForms are optimized for entering data which needs to be
validated and perhaps corrected before it can be transferred to
persistent storage. But for situations where this type of workflow is
not needed, neither are the ActionForms. 

A new addition to the view-end of the framework is Arron Bates' nested
taglib extension, which should be added to the nightly build soon. 

http://www.keyboardmonkey.com/struts/index.html


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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

Reply via email to