You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yury Rabiankou <yu...@dashofer.com.cy> on 2003/11/13 00:32:25 UTC
chaining actions
Hello everybody,
I cannot understand the following passage from Ted Husted's Struts in
Action (p.228):
"If you forward from one Action to another Action... the ActionForm
bean is reset, repopulated, and revalidated, and, if all goes well,
passed to the second Action"
How can the same ActionForm bean be passed to the second Action, if the
second Action could have a different ActionForm bean type
(different subclass of ActionForm used for the second Action).
Generally, I was under impression that ActionForms are always created
anew for each Action execute() call. I don't get it, in what cases an ActionForm is
reused and when reset() method could be called?
Thank you!
--
Best regards,
Yury mailto:yury@dashofer.com.cy
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: chaining actions
Posted by Manish Singla <Ma...@Sun.COM>.
It's true.
In case you have coarse grained ActionForm which is used by BOTH actions
in that case reset() will be called twice as request will go from
RequestProcessor both times.
Theoretically, in case you have DIFFERENT ActionForms for BOTH actions
in that case reset() will be called for respective ActionForms.
Request parameters to set values in ActionForm will be available in both
actions.
Thanks
Manish Singla
Yury Rabiankou wrote:
> Hello everybody,
>
> I cannot understand the following passage from Ted Husted's Struts in
> Action (p.228):
>
> "If you forward from one Action to another Action... the ActionForm
> bean is reset, repopulated, and revalidated, and, if all goes well,
> passed to the second Action"
>
> How can the same ActionForm bean be passed to the second Action, if the
> second Action could have a different ActionForm bean type
> (different subclass of ActionForm used for the second Action).
>
> Generally, I was under impression that ActionForms are always created
> anew for each Action execute() call. I don't get it, in what cases an ActionForm is
> reused and when reset() method could be called?
>
> Thank you!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org