public class ModelDrivenInterceptor extends AbstractInterceptor
ModelDriven actions and adds the action's model on to the value stack.
  Note:  The ModelDrivenInterceptor must come before the both StaticParametersInterceptor and
 ParametersInterceptor if you want the parameters to be applied to the model.
 
Note: The ModelDrivenInterceptor will only push the model into the stack when the model is not null, else it will be ignored.
Interceptor parameters:
Extending the interceptor:
There are no known extension points to this interceptor.Example code:
 
 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="modelDriven"/>
     <interceptor-ref name="basicStack"/>
     <result name="success">good_result.ftl</result>
 </action>
 
 | Modifier and Type | Class and Description | 
|---|---|
| protected static class  | ModelDrivenInterceptor.RefreshModelBeforeResultRefreshes the model instance on the value stack, if it has changed | 
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | refreshModelBeforeResult | 
| Constructor and Description | 
|---|
| ModelDrivenInterceptor() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | intercept(ActionInvocation invocation)Override to handle interception | 
| void | setRefreshModelBeforeResult(boolean val) | 
destroy, init, setDisabled, shouldInterceptpublic void setRefreshModelBeforeResult(boolean val)
public String intercept(ActionInvocation invocation) throws Exception
AbstractInterceptorintercept in interface Interceptorintercept in class AbstractInterceptorinvocation - the action invocationActionInvocation.invoke(), or from the interceptor itself.Exception - any system-level error, as defined in Action.execute().Copyright © 2000–2025 Apache Software Foundation. All rights reserved.