Dear Wiki user, You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by MichaelJouravlev: http://wiki.apache.org/struts/RolloverScope The comment on the change is: Small style changes ------------------------------------------------------------------------------ == Using rollover scope to store an action form == - In a Struts application a rollover scope can be used just as any other J2EE scope, including action mappings. To declare a rollover scope for an action form use scope="rollover" in action mapping definition. Below is an example of a standard redirect-after-post pattern: one mapping for submitting user data from browser, another mapping for rendering a web page. An implicit rollover scope is used to store form bean in between requests. + In a Struts application a rollover scope can be used just as any other J2EE scope, including action mappings. To declare a rollover scope for an action form use scope="rollover" in action mapping definition. Below is an example of a standard redirect-after-post pattern: one mapping for submitting user data from browser, another mapping for rendering a web page. A rollover scope is used to store form bean in between requests. The input action inherits from !EventDispatchAction and is used as event processor. Render action uses login/logout state to render an appropriate view. - The sample config below employs dual-action approach: one action for input, another for rendering. The input action inherits from !EventDispatchAction and is used as event processor. Render action uses login/logout state to render an appropriate view. + Events are defined in 'parameter' attribute (see !EventDispatchAction for details). Notice that 'scope' has 'rollover' value. A removal strategy of with lifetime of one request is defined for rollover scope - perfect for most redirect-after-post use cases. - Events are defined in 'parameter' attribute. Notice that 'scope' has 'rollover' value. The rollover scope has request-based removal strategy with lifetime of one request - perfect for redirect-after-post pattern. Besides automatic removal based on removal strategy, a rollover scope can be removed based on action outcome. In the sample below, if an input action chooses 'cancel' or 'userhome' outcomes, then rollover scope is removed before request is redirected to render action. + Besides automatic removal based on removal strategy, a rollover scope can be removed based on action outcome. In the sample below, if an input action chooses 'cancel' or 'userhome' outcomes, then rollover scope is removed when action finishes. {{{<action path = "/logininputaction" type = "org.apache.struts.samples.login.LoginInputAction"