Variable scopes

Spring Web Flow creates variables or objects under scopes. These scopes are just similar to JEE scope components, which determine the time frame of when to access these variables. Under Spring Web Flow, there are five scopes that can be mapped to a newly created object:

  • flowScope: Assigns a flow variable; variables under this scope get allocated when a flow starts and destroyed when the flow ends.; any objects stored in flow scope need to be serializable:
            <evaluate expression= "addCartProducts.retrieveProductList
                                  (flowScope.cartProducts)" />
    
  • conversationScope: Assigns a conversation variable; variables under this scope are used whenever a top-level needs to generate objects to be accessed by its sub-flows; they are destroyed when ...

Get Spring MVC Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.