Hi,

Seding formbean to model is not a good idea. why cant you use Beanutils.copyproperties method to copy values from your form to model.

sony


vasumathi wrote:
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