Class RejectedFormValuesInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
name.matthewgreet.strutscommons.interceptor.RejectedFormValuesInterceptor
- All Implemented Interfaces:
ConditionalInterceptor, Interceptor, Serializable, ConditionalInterceptor, Interceptor
Struts 2 Interceptor for setting conversion errors as overriding properties of the Value Stack, so rejected and failed form field values are displayed. This is the same as ConversionErrorInterceptor except it doesn't write error messages as AnnotationValidationInterceptor is expected to do this. In Interceptor stacks, it must be placed after interceptors to write or inject conversion errors, such as AnnotationValidationIntercetpor2 and FormRetrieveInterceptor, and after StaticParametersInterceptor as that wipes conversion errors.
Interceptor parameters:
- disabled
- If true, this interceptor is skipped.
Extending the interceptor:
This can't be usefully extended.
Example code:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="staticParams"/>
<interceptor-ref name="rejectedFormValues"/>
<result name="success">good_result.ftl</result>
</action>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConditionalInterceptor
ConditionalInterceptor.LegacyAdapter -
Field Summary
Fields inherited from class MethodFilterInterceptor
excludeMethods, includeMethods -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdoIntercept(ActionInvocation invocation) booleanvoidsetDisabled(boolean disabled) Methods inherited from class MethodFilterInterceptor
applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethodsMethods inherited from class AbstractInterceptor
intercept, shouldIntercept, shouldInterceptMethods inherited from class AbstractInterceptor
destroy, init, setDisabledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Interceptor
destroy, init
-
Constructor Details
-
RejectedFormValuesInterceptor
public RejectedFormValuesInterceptor()
-
-
Method Details
-
doIntercept
- Specified by:
doInterceptin classMethodFilterInterceptor- Throws:
Exception
-
getDisabled
public boolean getDisabled() -
setDisabled
public void setDisabled(boolean disabled)
-