You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Derek Richardson <De...@appiancorp.com> on 2003/09/26 21:57:59 UTC

Action Chaining

To enable action chaining in an intuitive way, it seems that when the ActionServlet is called, it can look for an attribute in the request that indicates whether it has run before in this request. If the attribute is not there, do everthing and then set the attribute; if the attribute is there, don't reload the action form and don't reset the action errors collection and don't do anything else that intuitively should be one-time-only.

Or maybe it's the request processor that's modified, in the same spirit. I've just had the idea, haven't actually looked at the code.

Of course, this is so obvious that it must have been discarded already with good reason. So, before I find out why it's not reasonable the hard way by implementing it, please tell me where the hidden problems lie.

Thanks,

Derek Richardson

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


Re: Action Chaining

Posted by Sgarlata Matt <sg...@bah.com>.
There are probably many different solutions to make action chaining more
intuitive.  However, action chaining is not considered a best practice in
the Struts community so effort will not be put forward to make it easier to
do.  There has been a lot of discussion of action chaining in both the user
and developer list archives.

As a quick summary, action chaining is considered a bad idea because it
generally indicates that logic that should be in a separate business tier
has been pushed up inappropriately to the presentation tier.  If you are
looking for a way to chain commands in the business tier you might want to
investigate the Commons Chain package, which is currently in the jakarta
commons sandbox.

I hope that answers your question,

Matt
----- Original Message ----- 
From: "Derek Richardson" <De...@appiancorp.com>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Friday, September 26, 2003 3:57 PM
Subject: Action Chaining


To enable action chaining in an intuitive way, it seems that when the
ActionServlet is called, it can look for an attribute in the request that
indicates whether it has run before in this request. If the attribute is not
there, do everthing and then set the attribute; if the attribute is there,
don't reload the action form and don't reset the action errors collection
and don't do anything else that intuitively should be one-time-only.

Or maybe it's the request processor that's modified, in the same spirit.
I've just had the idea, haven't actually looked at the code.

Of course, this is so obvious that it must have been discarded already with
good reason. So, before I find out why it's not reasonable the hard way by
implementing it, please tell me where the hidden problems lie.

Thanks,

Derek Richardson

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


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