Save This Page
Home » xwork-2.1.5 » com.opensymphony » xwork2 » [javadoc | source]
com.opensymphony.xwork2
public class: ActionChainResult [javadoc | source]
java.lang.Object
   com.opensymphony.xwork2.ActionChainResult

All Implemented Interfaces:
    Result

This result invokes an entire other action, complete with it's own interceptor stack and result. This result type takes the following parameters: Example:

<package name="public" extends="struts-default">
    <!-- Chain creatAccount to login, using the default parameter -->
    <action name="createAccount" class="...">
        <result type="chain">login</result>
    </action>

    <action name="login" class="...">
        <!-- Chain to another namespace -->
        <result type="chain">
            <param name="actionName">dashboard</param>
            <param name="namespace">/secure</param>
        </result>
    </action>
</package>

<package name="secure" extends="struts-default" namespace="/secure">
    <action name="dashboard" class="...">
        <result>dashboard.jsp</result>
    </action>
</package>
Field Summary
public static final  String DEFAULT_PARAM    The result parameter name to set the name of the action to chain to. 
public static final  String SKIP_ACTIONS_PARAM    The result parameter name to set the name of the action to chain to. 
Constructor:
 public ActionChainResult() 
 public ActionChainResult(String namespace,
    String actionName,
    String methodName) 
 public ActionChainResult(String namespace,
    String actionName,
    String methodName,
    String skipActions) 
Method from com.opensymphony.xwork2.ActionChainResult Summary:
equals,   execute,   getChainHistory,   getProxy,   hashCode,   setActionName,   setActionProxyFactory,   setMethod,   setNamespace,   setSkipActions
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.xwork2.ActionChainResult Detail:
 public boolean equals(Object o) 
 public  void execute(ActionInvocation invocation) throws Exception 
 public static LinkedList<String> getChainHistory() 
    Get the XWork chain history. The stack is a list of namespace/action!method keys.
 public ActionProxy getProxy() 
 public int hashCode() 
 public  void setActionName(String actionName) 
    Set the action name.
 public  void setActionProxyFactory(ActionProxyFactory actionProxyFactory) 
 public  void setMethod(String method) 
 public  void setNamespace(String namespace) 
    sets the namespace of the Action that we're chaining to. if namespace is null, this defaults to the current namespace.
 public  void setSkipActions(String actions) 
    Set the list of actions to skip. To test if an action should not throe an infinite recursion, only the action name is used, not the namespace.