public class StrutsConversionErrorInterceptor extends ConversionErrorInterceptor
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:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="params"/>
<interceptor-ref name="conversionError"/>
<result name="success">good_result.ftl</result>
</action>
ORIGINAL_PROPERTY_OVERRIDE| Constructor and Description |
|---|
StrutsConversionErrorInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
getOverrideExpr(ActionInvocation invocation,
Object value) |
protected boolean |
shouldAddError(String propertyName,
Object value)
Returns false if the value is null, "", or {""} (array of size 1 with a blank element).
|
escape, interceptdestroy, initprotected Object getOverrideExpr(ActionInvocation invocation, Object value)
getOverrideExpr in class ConversionErrorInterceptorprotected boolean shouldAddError(String propertyName, Object value)
shouldAddError in class ConversionErrorInterceptorpropertyName - the name of the property to check.value - the value to error check.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.