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

Reply via email to