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:
com.opensymphony.xwork2.interceptor.ConditionalInterceptor, com.opensymphony.xwork2.interceptor.Interceptor, Serializable, org.apache.struts2.interceptor.ConditionalInterceptor, org.apache.struts2.interceptor.Interceptor

public class RejectedFormValuesInterceptor extends com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

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 com.opensymphony.xwork2.interceptor.ConditionalInterceptor

    com.opensymphony.xwork2.interceptor.ConditionalInterceptor.LegacyAdapter
  • Field Summary

    Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

    excludeMethods, includeMethods
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    doIntercept(com.opensymphony.xwork2.ActionInvocation invocation)
     
    boolean
     
    void
    setDisabled(boolean disabled)
     

    Methods inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

    applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods

    Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor

    intercept, shouldIntercept, shouldIntercept

    Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor

    destroy, init, setDisabled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.struts2.interceptor.Interceptor

    destroy, init
  • Constructor Details

    • RejectedFormValuesInterceptor

      public RejectedFormValuesInterceptor()
  • Method Details

    • doIntercept

      protected String doIntercept(com.opensymphony.xwork2.ActionInvocation invocation) throws Exception
      Specified by:
      doIntercept in class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
      Throws:
      Exception
    • getDisabled

      public boolean getDisabled()
    • setDisabled

      public void setDisabled(boolean disabled)