sending form reference to the model is not the correct way as it will make
model dependent on the view.
do not send the formbean object till the model.

-----Original Message-----
From: vasumathi [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 5:19 PM
To: Struts Users Mailing List
Subject: Re: which method is better


If you want to submit all the values to database, you can pass form ref.
but in case of submitting one or two values to database, what is the need of
sending form ref, we can pass those values itself.

> Hello,
>
> I usually have set and get methods for all properties in my Model class.
> After submitting a form, I pull out all the property values (form fields)
> in
> the Action class from the ActionForm object, set the values of all
> properties in the model from the action class and then call a particular
> method in the model class for final submission to the database.
>
> I wanted to know thether the above mentioned method is better or is it
> better to pass the form reference itself to the Model class which then
sets
> the values.
>
> In situation 2, I do not have to take care of the various String
references
> that I create. I simply will pass the ActionForm object to the Model
class.
>
> regards,
> vijay.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




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



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

Reply via email to