Action chaining works like this: Interceptors-stack A before Action A Interceptor-stack B before Action B Action B result Interceptor-stack B after Interceptor-stack B after
If you want callbacks before the results are executed (for instance the chaining result or Action B's result) you can have your Interceptors register instances of com.opensymphony.xwork.interceptor.PreResultListener with the ActionInvocation using addPreResultListener(PreResultListener listener) and it will get called after the Action has executed and before the result is executed. Jason > -----Original Message----- > From: Anoop Ranganath [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 04, 2003 9:44 AM > To: [EMAIL PROTECTED] > Subject: Re: AW: [OS-webwork] action chaining fun > > > That chains them, but it is not the behavior I am looking for. > Ideally, if i had action A interceptor-stack A and action B with > interceptor-stack B, this would happen > > interceptor-stack A before > action A > interceptor-stack A after > interceptor-stack B before > action B > interceptor-stack B after > > And somehow get a property from action A to action B. > > This is a moot point right now, I've already found a way to > work around > the issue. I would like to knwo if it's possible though. > > Anoop > > On Dec 4, 2003, at 3:51 AM, Patrick Holzmann wrote: > > > Hi Anoop, > > > > all you have to do is have a getter/setter for the parameter in both > > actions (+ same name for variable). > > Then you include the chaining interceptor (<interceptor-ref > > name="chain"/>) to your interceptor stack > > in xwork.xml: > > <interceptor-stack name="myStack"> > > <interceptor-ref name="component"/> > > <interceptor-ref name="defaultStack"/> > > <interceptor-ref name="chain"/> > > </interceptors> > > ... > > Then you chain both actions together: > > <action name="forward_somewhere" class="..."> > > <interceptor-ref name="myStack"/> > > <result name="success" type="chain"> > > <param name="actionName">show</param> > > </result> > > </action> > > <action name="show_something" class="..."> > > <interceptor-ref name="myStack"/> > > <result name="success" type="dispatcher"> > > <param name="location">/some.jsp</param> > > </result> > > </action> > > > > Basically that's all - Xowrk does the rest for you. The set > method in > > the second action will be called passing the parameter > automatically. > > > > Hope this helps. > > Cheers > > P > > > > > > -----Ursprüngliche Nachricht----- > > Von: Anoop Ranganath [mailto:[EMAIL PROTECTED] > > Gesendet: Mittwoch, 3. Dezember 2003 21:08 > > An: [EMAIL PROTECTED] > > Betreff: [OS-webwork] action chaining fun > > > > > > I'm looking to somehow implement chain-like behaviour. I'd like to > > perform one action completely, with all it's interceptors, and then > > perform another action completely with all it's interceptors. The > > catch is that I want some parameters passed between them. > > > > Any ideas? > > > > Anoop > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > SourceForge.net help you be more productive? Does it help > you create > > better code? SHARE THE LOVE, and help us help YOU! Click Here: > > http://sourceforge.net/donate/ > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > SourceForge.net help you be more productive? Does it help > you create > > better code? SHARE THE LOVE, and help us help YOU! Click Here: > > http://sourceforge.net/donate/ > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us > help YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork