Class FormFormatterInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
name.matthewgreet.strutscommons.interceptor.FormFormatterInterceptor
- All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor
,Serializable
public class FormFormatterInterceptor
extends com.opensymphony.xwork2.interceptor.AbstractInterceptor
Struts 2 Interceptor for formatting annotated form fields from their parsed values. If the Action implements
ModelDriven
, the model is recognised as the form, not the action.
This is known to have design flaws that can make it incompatible with existing code. See Form Formatting
Interceptor parameters:
- disabled
- If true, all processing for this action is disabled. Defaults to false.
Extending the interceptor:
This interceptor cannot be usefully extended.
Example code:
<action name="someAction" class="com.examples.SomeAction"> <interceptor-ref name="annotationValidation"/> <interceptor-ref name="validation"/> <interceptor-ref name="formFormatter"/> <result name="success">good_result.ftl</result> </action>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
intercept
(com.opensymphony.xwork2.ActionInvocation invocation) void
setDisabled
(boolean disabled) Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init
-
Constructor Details
-
FormFormatterInterceptor
public FormFormatterInterceptor()
-
-
Method Details
-
getDisabled
public boolean getDisabled() -
setDisabled
public void setDisabled(boolean disabled) -
intercept
- Specified by:
intercept
in interfacecom.opensymphony.xwork2.interceptor.Interceptor
- Specified by:
intercept
in classcom.opensymphony.xwork2.interceptor.AbstractInterceptor
- Throws:
Exception
-