org.apache.struts2.interceptor
类 ActionMappingParametersInteceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
com.opensymphony.xwork2.interceptor.ParametersInterceptor
org.apache.struts2.interceptor.ActionMappingParametersInteceptor
- 所有已实现的接口:
- com.opensymphony.xwork2.interceptor.Interceptor, Serializable
public class ActionMappingParametersInteceptor
- extends com.opensymphony.xwork2.interceptor.ParametersInterceptor
This interceptor sets all parameters from the action mapping, for this request, on the value stack. It operates
exactly like ParametersInterceptor
, only the parameters come from the ActionMapping
, not the
ActionContext.getParameters()
method.
Interceptor parameters:
- ordered - set to true if you want the top-down property setter behaviour
Extending the interceptor:
The best way to add behavior to this interceptor is to utilize the ParameterNameAware
interface in your
actions. However, if you wish to apply a global rule that isn't implemented in your action, then you could extend
this interceptor and override the ParametersInterceptor.acceptableName(String)
method.
Example code:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="mappingParams"/>
<result name="success">good_result.ftl</result>
</action>
- 另请参见:
- 序列化表格
从类 com.opensymphony.xwork2.interceptor.ParametersInterceptor 继承的字段 |
ACCEPTED_PARAM_NAMES |
从类 com.opensymphony.xwork2.interceptor.ParametersInterceptor 继承的方法 |
doIntercept, isOrdered, setAcceptParamNames, setDevMode, setExcludeParams, setOrdered, setParamNameMaxLength, setValueStackFactory |
从类 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor 继承的方法 |
getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods |
从类 com.opensymphony.xwork2.interceptor.AbstractInterceptor 继承的方法 |
destroy, init |
ActionMappingParametersInteceptor
public ActionMappingParametersInteceptor()