You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by su...@tcs.com on 2004/02/18 07:59:17 UTC
[RePOST]: How to avoid Action-Chaining?
Hi all,
I have a form named formA which executes actionA, then he is forwarded
actionB on submit. now actionB will populate some of the attribtues of
formB.
[example attributes that are required for listboxes]
The problem is: when I execute actionB, I have to know about some data
the user posted on formA.
How to avoid Action-Chaining here.
Thanks and Regards
Subramaniam Olaganthan
Tata Consultancy Services
Mailto: subramaniam.o@tcs.com
Website: http://www.tcs.com
Re: [RePOST]: How to avoid Action-Chaining?
Posted by Mark Lowe <ma...@talk21.com>.
You can store the values from formA and put them into the request
before forwarding to the jsp with formB
FooForm theForm = (FooForm) form;
String foo = theForm.getFoo();
String bar = theForm.getBar();
//do what you want with form data.
//
Then
request.setAttribute("foo",foo);
request.setAttribute("bar",bar);
if formB has the properties
<html:text property="foo" />
<html:text property="bar" />
then it will be populated with the values stored in the request.
On 18 Feb 2004, at 07:59, subramaniam.o@tcs.com wrote:
>
>
> Hi all,
>
> I have a form named formA which executes actionA, then he is forwarded
> actionB on submit. now actionB will populate some of the attribtues
> of formB.
> [example attributes that are required for listboxes]
>
> The problem is: when I execute actionB, I have to know about some data
> the user posted on formA.
>
> How to avoid Action-Chaining here.
>
> Thanks and Regards
>
> Subramaniam Olaganthan
> Tata Consultancy Services
> Mailto: subramaniam.o@tcs.com
> Website:
> http://
> www.tcs.com<InterScan_Disclaimer.txt>----------------------------------
> -----------------------------------
> 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