Save This Page
Home » webwork-2.2.7 » com.opensymphony.webwork.interceptor » [javadoc | source]
com.opensymphony.webwork.interceptor
public class: FlashInterceptor [javadoc | source]
java.lang.Object
   com.opensymphony.xwork.interceptor.AroundInterceptor
      com.opensymphony.webwork.interceptor.FlashInterceptor
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. 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>


Field Summary
public static final  String DEFAULT_KEY     
public static final  String STORE     
public static final  String RETRIEVE     
Method from com.opensymphony.webwork.interceptor.FlashInterceptor Summary:
after,   before,   getKey,   getOperation,   setKey,   setOperation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.webwork.interceptor.FlashInterceptor Detail:
 protected  void after(ActionInvocation invocation,
    String result) throws Exception 
 protected  void before(ActionInvocation invocation) throws Exception 
 public String getKey() 
 public String getOperation() 
 public  void setKey(String key) 
 public  void setOperation(String operation)