PROBLEM
In the context of Spring Web Flow, a model serves the same function as a model in Spring MVC. The model generally represents the data that will be passed to and from a View State (instead of an Operation) and the view. Spring Web Flow supports various options and patterns for defining the data that can be passed back and forth, and a typical Spring Web Flow application may use a combination of these options. The flexibility of Spring Web Flow to have fine-grained control for defining models is very powerfull, however the definition of the models can be difficult because the models are defined and used in xml (flow).
SOLUTION
Through the use of the Skyway Web Flow editor, defining models is much simpler because the flow is represented in a diagram. This is very effective for defining models and to understand the use of models in a Spring web Flow implementation.
HOW IT WORKS
Once again a model generally refers to the data that is pased to and from a web flow View State.
Steps for defining a Model for a Spring Web Flow view state:
In a flow diagram, identify a View State for configuring a model.
For the model parameter, specify the variable that should be used for the model. The model will be the commandObject that can be used in the JSP to display data to and/or solicit data from the end-user.
RELATED RECIPES