struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: Change Action, ActionForm to use ActionContext?
Date Mon, 14 Feb 2005 15:22:16 GMT
On Mon, February 14, 2005 9:20 am, Joe Germuska said:
> Well, since you can already use an <action> element to cause the
> invocation of a command (or chain), I think it would be redundant to
> make "Action" a command for that purpose.  However, if we go ahead
> and change the signature to Action, the net effect will be about the
> same, as the "ExecuteAction" command will certainly pass in the same
> chain (Action)Context which would be passed in to
> Action-implementing-Command.  The only real difference would be
> whether or not the Action class would be given the ability to return
> "true" to indicate that the chain processing should go no further.
> So, as it stands now, the main benefit of privileging "Action" is
> that you can specify the processing class in struts-config.xml,
> instead of having to go to another file to set it up.  That's a
> decent benefit, I'd say -- we don't want to make configuration a
> nightmare.

No argument at all, anything that makes configuration more difficult,
unless there is such a clear benefit as to justify the added difficulty,
is something to be avoided.

However, the more I think about it, the more the idea of making an Action
a Command appeals to me.  Further, as I mentioned in another post,
conceptually I can see where you might consider the Action execution of
the overall request processing chain to itself be a subchain, even if most
of the time it's a chain with a single Command.  To do this though, if I
understand what your saying, would require a developer to configure that
subchain in chains-config.  That wouldn't be a good thing.

But, if we for a moment assume that the conceptual argument for an Action
being a Command in an "Action chain", which is itself just a subchain of
the overall request processing chain, is something we agree upon, we're
really at that point just talking about a matter of configuration.  If
we're there, I would think the configuration issue could be dealt with,
perhaps something as simple as having Struts read in the action mapping,
which contains the chain configuration information, and pass just the
pertinent chain information to the Commons Chain configuration module
through what might be a new configuration path... For instance, what if an
Action has a new attribute "chain" that is just a comma-separated list of
Commands to execute.  I would have to think there would be a way of taking
that list and configuring a chain based on it, no?  Even if such
functionality didn't exist now, would adding it to Commons Chain be all
that onerous, especially if we agree about the benefit?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message