Package org.apache.struts2.interceptor
Class StrutsConversionErrorInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.MethodFilterInterceptor
org.apache.struts2.interceptor.ConversionErrorInterceptor
org.apache.struts2.interceptor.StrutsConversionErrorInterceptor
- All Implemented Interfaces:
- Serializable,- ConditionalInterceptor,- Interceptor
 This interceptor extends ConversionErrorInterceptor but only adds conversion errors from the ActionContext to
 the field errors of the action if the field value is not null, "", or {""} (a size 1 String array with only an empty
 String). See ConversionErrorInterceptor for more information, as well as the Type Conversion documentation.
 
Interceptor parameters:
- None
Extending the interceptor:
There are no known extension points for this interceptor.
 
 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="params"/>
     <interceptor-ref name="conversionError"/>
     <result name="success">good_result.ftl</result>
 </action>
 
 - 
Field SummaryFields inherited from class org.apache.struts2.interceptor.ConversionErrorInterceptorORIGINAL_PROPERTY_OVERRIDEFields inherited from class org.apache.struts2.interceptor.MethodFilterInterceptorexcludeMethods, includeMethods
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectgetOverrideExpr(ActionInvocation invocation, Object value) protected booleanshouldAddError(String propertyName, Object value) Returns false if the value is null, "", or {""} (array of size 1 with a blank element).Methods inherited from class org.apache.struts2.interceptor.ConversionErrorInterceptordoIntercept, escapeMethods inherited from class org.apache.struts2.interceptor.MethodFilterInterceptorapplyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethodsMethods inherited from class org.apache.struts2.interceptor.AbstractInterceptordestroy, init, setDisabled, shouldIntercept
- 
Constructor Details- 
StrutsConversionErrorInterceptorpublic StrutsConversionErrorInterceptor()
 
- 
- 
Method Details- 
getOverrideExpr- Overrides:
- getOverrideExprin class- ConversionErrorInterceptor
 
- 
shouldAddErrorReturns false if the value is null, "", or {""} (array of size 1 with a blank element). Returns true otherwise.- Overrides:
- shouldAddErrorin class- ConversionErrorInterceptor
- Parameters:
- propertyName- the name of the property to check.
- value- the value to error check.
- Returns:
- false if the value is null, "", or {""}, true otherwise.
 
 
-