Having non-String types values in the ActionForm
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rami_Abramson
Posted On:   Monday, July 11, 2005 07:39 AM

			
Hello all,

Have read the chapter about ActionForms in Ted Husted's "STRUTS in action".
To my understanding (this is barely mentioned and not emphasized) it is a good practice to have only Strings, as values in the ActionForm (Arrays of Strings are probably OK too).

Questions:
1> What is the motivation for this?
2> Is it not recommentdable to have business-ValueObjects as values in the ActionForm? or there's nothing wrong with it?

Thank you, :)

Rami

Re: Having non-String types values in the ActionForm

Posted By:   alan_do  
Posted On:   Monday, July 11, 2005 12:45 PM

i am not sure where you got this idea from, but this isn't the case. you CAN and will eventually need to use objects in your action forms. this is especially critical when you use indexed properties to handle more complex form elements. i have been using struts for over 2 years and have yet to find an app that doesn't require some sort of object to be kept in the ActionForm. -/a
About | Sitemap | Contact