which method is better

2006-02-28 Thread R.Vijayaraghavan
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

Re: which method is better

2006-02-28 Thread Oshima Tlholoe
With my rudimentary knowledge,I dont think its advisable for your Action classes to talk directly to your business layer/model classes, Why don't you have a business delegate/session facade or Service Locator sitting between your Action Classes and the model classes, this insulates your action

RE: which method is better

2006-02-28 Thread R.Vijayaraghavan
, vijay. -Original Message- From: Oshima Tlholoe [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 2006 2:53 PM To: Struts Users Mailing List Subject: Re: which method is better With my rudimentary knowledge,I dont think its advisable for your Action classes to talk directly

RE: which method is better

2006-02-28 Thread R.Vijayaraghavan
() { ProductModel model = new ProductModel(); model.setForm(form);// action form reference which the execute method gets model.saveToPersistentStore(); } } I do not know which method will be better. I don't even know if there is any

Re: which method is better

2006-02-28 Thread Oshima Tlholoe
: Tuesday, February 28, 2006 2:53 PM To: Struts Users Mailing List Subject: Re: which method is better With my rudimentary knowledge,I dont think its advisable for your Action classes to talk directly to your business layer/model classes, Why don't you have a business delegate/session

Re: which method is better

2006-02-28 Thread Mark Lowe
Subject: Re: which method is better With my rudimentary knowledge,I dont think its advisable for your Action classes to talk directly to your business layer/model classes, Why don't you have a business delegate/session facade or Service Locator sitting between your Action Classes

Re: which method is better

2006-02-28 Thread Mark Lowe
(); } } I do not know which method will be better. I don't even know if there is any other technique we should follow as Oshima pointed it. Passing an action form to the model is considered a bad move as you are coupling your model to struts. The idea being that your may want to change the view

[OT] The M in MVC (WAS: which method is better)

2006-02-28 Thread Antonio Petrelli
R.Vijayaraghavan ha scritto: 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

Re: which method is better

2006-02-28 Thread vasumathi
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

RE: which method is better

2006-02-28 Thread Shasirekha Engala
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

Re: which method is better

2006-02-28 Thread Sony Thomas
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,

Re: [OT] The M in MVC (WAS: which method is better)

2006-02-28 Thread Michael Jouravlev
On 2/28/06, Antonio Petrelli [EMAIL PROTECTED] wrote: R.Vijayaraghavan ha scritto: 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,