com.opensymphony.webwork.interceptor
Class FlashInterceptor
java.lang.Object
com.opensymphony.xwork.interceptor.AroundInterceptor
com.opensymphony.webwork.interceptor.FlashInterceptor
- All Implemented Interfaces:
- com.opensymphony.xwork.interceptor.Interceptor, Serializable
public class FlashInterceptor
- extends com.opensymphony.xwork.interceptor.AroundInterceptor
Flash interceptor (FlashInterceptor) possibly with FlashResult
allows current action to be available even after a redirect. It does this by
saving the current action into http session and pushing it back into the stack
next request, resulting in the nett effect of the action and its related information
being available across redirect.
- key - The Http Session key under which the action will be stored,
default to
DEFAULT_KEY which is
the string '__flashAction'.
- operation - The operation mode of this interceptor, either
STORE having a string value of 'Store' or
RETRIEVE having a string value of 'Retrieve'
The default operation mode is RETRIEVE
There's no intended extension points
<!-- Usage 1: (Using only Flash interceptor) -->
<action name="store" ...>
<interceptor-ref name="flash">
<param name="operation">Store</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result type="redirect">redirectToSomeWhere.jsp</result>
</action>
<action name="retrieve">
<interceptor-ref name="flash">
<param name="operation">Retrieve</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result>pageWhereWeNeedFlashActionStored.jsp</result>
</action>
<!-- Usage 2: (Using Flash Interceptor and Flash Result) -->
<action name="store">
<result type="flash">redirectToSomeWhere.jsp</result>
</action>
<action name="retrieve">
<interceptor-ref name="flash">
<param name="operation">Retrieve</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result>pageWhereWeNeedFlashActionStored.jsp</result>
</action>
- Version:
- $Date$ $Id$
- Author:
- tmjee
- See Also:
- Serialized Form
| Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor |
log |
| Methods inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor |
destroy, init, intercept |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_KEY
public static final String DEFAULT_KEY
- See Also:
- Constant Field Values
STORE
public static final String STORE
- See Also:
- Constant Field Values
RETRIEVE
public static final String RETRIEVE
- See Also:
- Constant Field Values
FlashInterceptor
public FlashInterceptor()
setKey
public void setKey(String key)
getKey
public String getKey()
setOperation
public void setOperation(String operation)
getOperation
public String getOperation()
after
protected void after(com.opensymphony.xwork.ActionInvocation invocation,
String result)
throws Exception
- Specified by:
after in class com.opensymphony.xwork.interceptor.AroundInterceptor
- Throws:
Exception- See Also:
AroundInterceptor.after(com.opensymphony.xwork.ActionInvocation, java.lang.String)
before
protected void before(com.opensymphony.xwork.ActionInvocation invocation)
throws Exception
- Specified by:
before in class com.opensymphony.xwork.interceptor.AroundInterceptor
- Throws:
Exception- See Also:
AroundInterceptor.before(com.opensymphony.xwork.ActionInvocation)
Copyright © 2013 OpenSymphony. All Rights Reserved.