...
Code Block | ||||
---|---|---|---|---|
| ||||
<action name="myAction" class="myActionClass">
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="params"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="params"/>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
<param name="excludeMethods">myValidationExcudeMethod</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods">myWorkflowExcludeMethod</param>
</interceptor-ref>
</action>
|
Method
...
2:
Code Block | ||||
---|---|---|---|---|
| ||||
{code:xml}
<action name="myAction" class="myActionClass">
<interceptor-ref name="defaultStack">
<param name="validation.excludeMethods">myValidationExcludeMethod</param>
<param name="workflow.excludeMethods">myWorkflowExcludeMethod</param>
</interceptor-ref>
</action>
|
...
Note also that in this case the interceptor-ref
name attribute is used to indicate an interceptor stack which makes sense as if it is referring to the interceptor itself it would be just using Method 1 describe above.
...
...
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 | ||||
---|---|---|---|---|
| ||||
{code:xml}
<interceptor-stack name="parentStack">
<interceptor-ref name="postPrepareParameterFilter">
<param name="defaultBlock">true</param>
</interceptor-ref>
</interceptor-stack>
|
...