Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
{snippet:id=parameterOverriding|javadoc=true|url=com.opensymphony.xwork2.interceptor/Interceptor.java}

Interceptor Parameter Overriding Inheritance

Parameters override are not inherited in interceptors, meaning that the last set of overridden parameters will be used. For example, if a stack overrides the parameter "defaultBlock" for the "postPrepareParameterFilter" interceptor as:

Code Block
xml
xml

<interceptor-stack name="parentStack">
  <interceptor-ref name="postPrepareParameterFilter">
    <param name="defaultBlock">true</param>
  </interceptor-ref>
</interceptor-stack> 

and an action overrides the "allowed" for "postPrepareParameterFilter":

Code Block
xml
xml

<package name="child2" namespace="/child" extends="parentPackage">
  <action name="list" class="SomeAction">
    <interceptor-ref name="parentStack">
      <param name="postPrepareParameterFilter.allowed">myObject.name</param>
    </interceptor-ref>
  </action>
</package> 

Then, only "allowed" will be overridden for the "postPrepareParameterFilter" interceptor in that action.

Order of Interceptor Execution

...