Subject: Re: Why separate form bean to collect form data?
From: Vic C <[EMAIL PROTECTED]>
 ===
Right on JM. MVC, Modular, light weight. That is Struts.
Model should be separate and unit testable.

James Mitchell wrote:
> Hi Norman,
> Yes this is possible, but it defeats (in part) the goals of MVC.  The
> closest thing to what you want may be to use the DynaActionForm class.  That
> way you can just define the field(s) in the struts-config and use then as
> you would any normal ActionForm in your jsp.
> 
> James Mitchell
> 
> 
>>-----Original Message-----
>>From: Ryan Norman [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, May 28, 2002 8:01 PM
>>To: Struts User Mailing List
>>Subject: Why separate form bean to collect form data?
>>
>>
>>Hi,
>>
>>I am Norman.
>>
>>Instead of creating a new form bean for each form, can we create a generic
>>form class that can collect all the data in a form? Using methods in the
>>request
>>object through which we can find all the control names and their
>>values or a
>>definition that identifies form data to be copied to the generic
>>form bean,
>>we eliminate mechanical coding get and set properties for each new form.
>>Other generic form processing can be added to this form as well.
>>To further
>>"validate" the form, we can extend generic form class for each specific
>>form.
>>
>>The intent is to write minimal amount of new code for new application or
>>function.
>>
>>Any comments, opinions, criticism?
>>
>>Thanks
>>
>>Ryan Norman
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
> 
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



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

Reply via email to