Home > Guides > Core Developers Guide > Interceptors > Chaining Interceptor |
An interceptor that copies all the properties of every object in the value stack to the currently executing object, except for any object that implements Unchainable. A collection of optional includes
and excludes
may be provided to control how and which parameters are copied. Only includes
or excludes
may be specified. Specifying both results in undefined behavior. See the javadocs for ReflectionProvider#copy(Object, Object, java.util.Map, java.util.Collection, java.util.Collection) for more information.
By default Errors, Field errors and Message aren't copied during chaining, to change the behaviour you can specify the below three constants in struts.properties or struts.xml:
struts.xwork.chaining.copyErrors
- set to true to copy Action Errorsstruts.xwork.chaining.copyFieldErrors
- set to true to copy Field Errorsstruts.xwork.chaining.copyMessages
- set to true to copy Action Messagesexcludes
(optional) - the list of parameter names to exclude from copying (all others will be included)includes
(optional) - the list of parameter names to include when copying (all others will be excluded)There are no known extension points to this interceptor.
Simple example how to chain two actions
This examples chains two actions but only one property from first action is copied to another