struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: Eliminate Setup Actions
Date Tue, 08 Mar 2005 14:23:44 GMT
Sorry, I haven't been following this whole thread, but when I saw 
this config example from Frank:

>     > <action path="myAction" type="com.omnytex.actions.MyAction">
>     >    <setupItem class="com.omnytex.setup.MyActionSetup"
>     > method="setupMethod1" />
>     >    <forward name="defaultForward" path="page1.jsp">
>     >      <setupItem class="com.omnytex.setup.MyDefaultSetup"
>     > method="defSetup1" />
>     >    </forward>
>     > </action>

I wondered "why not use chain?"

In Struts 1.3, you can specify a command in the <action> element 
which will be executed before Struts processes the action, forward, 
or include specified in the same element.

I haven't done anything about it yet, but I've kind of been expecting 
to add a similar kind of configuration value to forward elements.  It 
is probably the most straightforward way to plug-in the kind of 
page-prep behavior that I've hacked in to other apps.

Since there is a DispatchCommand in commons-chain (the post 1.0, as 
yet unreleased version), you could achieve exactly this, with the 
only difference being that some of the configuration goes in another 
file -- a chain-config.xml

If I missed something in other messages on this thread, please fill me in...

Joe

-- 
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Mime
View raw message