You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric C <ch...@wanadoo.fr> on 2004/01/13 19:56:03 UTC
Multiple Beans one Action
Hello all and happy new year,
suppose I have 2 beans one beanA extends Action Form, the other beanB
extends ValidatorForm. I have one Action class which needs data from both
beans. How can I do that ?
Regards,
ERic
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Multiple Beans one Action
Posted by Mark Lowe <ma...@talk21.com>.
you can store one in the session,
FirstForm beanA = (FIrstForm) form;
SecondForm beanB = (SecondForm) session.getAttribute("beanB");
Or nest beanB in beanA or vice versa.
On 13 Jan 2004, at 18:56, Eric C wrote:
> Hello all and happy new year,
>
> suppose I have 2 beans one beanA extends Action Form, the other beanB
> extends ValidatorForm. I have one Action class which needs data from
> both
> beans. How can I do that ?
>
> Regards,
> ERic
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org