You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2006/12/01 00:19:14 UTC

Re: Does Struts 2 solve the action chaining problem?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tarek,

Tarek Nabil wrote:
> Christopher,
> 
> I really wonder if the Struts you're talking about is the one I've using
> for years now!! The Struts I know sucks big time when it comes to action
> chaining. I'm afraid I don't understand how defining two mappings, one
> with validation turned on and the other turned off, solves the first
> problem! As for the second problem, your solution still involves action
> chaining which should be avoided unless you've done something equivalent
> to what Yujun did.

I suppose I've never tried to modify the state of the request (or form
bean) such that re-interpreting it across action invocations is
relevant. I typically get information out of a form bean ASAP and then
use that for some other operation (most often database interaction).
Then I discard the form bean.

If I have to re-read the form bean, it's in the same state in which I
left it.

I guess if you store a lot of state information in your form beans, and
you mutate that information in your actions, you might end up fighting
against Struts. As it is for me, forwarding from one action to another
(that both use the same form bean) results in no problems except a
slight performance hit for re-populating the bean and validating it when
entering the second action.

I never use beans that contain anything but Strings, so no conversion
ever needs to take place. It looks like my mode of use has resulted in
me never realizing what a PITA it might be when attempting to "chain
actions" in this way.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFb2by9CaO5/Lv0PARAtveAJ9AyWu4w0x7CUOuRvxXDjoKcVKbxwCfXCvc
licIhQWz58NCiqrqaR8XwO8=
=cSgU
-----END PGP SIGNATURE-----

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