You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pavel Sapozhnikov <pa...@gmail.com> on 2007/08/23 23:43:40 UTC

Struts2 POJO Forms

Hi everybody. I remember in Struts1 we have those things ActionForms and
when you submit a form everything gets copied to into a form in fact you can
make your own form in Struts1. Is the same possible in Struts2 for instance
I heard about the POJO Forms. How would I tell struts to use that POJO Form
for this action?

-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

Re: Struts2 POJO Forms

Posted by Laszlo Borsos <bl...@freemail.hu>.
Thank you. Actually that's exactly what I meant and what I need.


Piero Sartini írta:
> On Friday 24 August 2007 12:29:23 Laszlo Borsos wrote:
>> If some properties are in the action bean (e.g. hidden fields) and
>> others in the model bean, will both be populated, because both object
>> are found on the stack? If so, is the model object the upmost stack
>> element?
> 
> I am not sure if both are populated. What I can say is that if a property is 
> not found in the model, the action property is populated if present.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 POJO Forms

Posted by Piero Sartini <li...@pierosartini.de>.
On Friday 24 August 2007 12:29:23 Laszlo Borsos wrote:
> If some properties are in the action bean (e.g. hidden fields) and
> others in the model bean, will both be populated, because both object
> are found on the stack? If so, is the model object the upmost stack
> element?

I am not sure if both are populated. What I can say is that if a property is 
not found in the model, the action property is populated if present.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 POJO Forms

Posted by Laszlo Borsos <bl...@freemail.hu>.
I also think about using Model-Driven interceptor.
If some properties are in the action bean (e.g. hidden fields) and
others in the model bean, will both be populated, because both object
are found on the stack? If so, is the model object the upmost stack element?

kuvera


Piero Sartini írta:
> On Thursday 23 August 2007 23:43:40 Pavel Sapozhnikov wrote:
>> Hi everybody. I remember in Struts1 we have those things ActionForms and
>> when you submit a form everything gets copied to into a form in fact you
>> can make your own form in Struts1. Is the same possible in Struts2 for
>> instance I heard about the POJO Forms. How would I tell struts to use that
>> POJO Form for this action?
> 
> First, in s2 your action may be a POJO itself or implement "ModelDriven".
> See http://struts.apache.org/2.0.9/docs/model-driven-interceptor.html
> for more information.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 POJO Forms

Posted by Piero Sartini <li...@pierosartini.de>.
On Thursday 23 August 2007 23:43:40 Pavel Sapozhnikov wrote:
> Hi everybody. I remember in Struts1 we have those things ActionForms and
> when you submit a form everything gets copied to into a form in fact you
> can make your own form in Struts1. Is the same possible in Struts2 for
> instance I heard about the POJO Forms. How would I tell struts to use that
> POJO Form for this action?

First, in s2 your action may be a POJO itself or implement "ModelDriven".
See http://struts.apache.org/2.0.9/docs/model-driven-interceptor.html
for more information.










---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org