Dashboard > WebWork > ... > Interceptors > Flash Interceptor
  WebWork Log In View a printable version of the current page.  
  Flash Interceptor
Added by tm_jee, last edited by tm_jee on Dec 11, 2006
Labels: 
(None)

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.

Parameters

  • key - The Http Session key under which the action will be stored, default to FlashInterceptor#DEFAULT_KEY which is the string '__flashAction'.
  • operation - The operation mode of this interceptor, either FlashInterceptor#STORE having a string value of 'Store' or FlashInterceptor#RETRIEVE having a string value of 'Retrieve' The default operation mode is FlashInterceptor#RETRIEVE

Extending the Interceptor

There's no intended extension points

Examples

<!-- 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>

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators