Feb 27th, 2012, 09:31 AM
Getting started with Web Flow
Hi there, I spent the whole day trying to get something done with Web Flow...and failed All the tutorials I find end with "Hello world" or are outdated. It's plain simple: I installed the webflow-showcase example on my machine, runs fine. However, that example just shows the transition from one state to another one. What I want is some kind of user input in a form (can be anything, just a simple String) that is printed on the next state to see that it actually does something. Later, I want to process this data with an SpringMVC controller, but that is not needed in the first place.
Thanks for your time and attention,
Feb 29th, 2012, 02:01 AM
OK, solved that myself. I defined a model and loaded it via variable in the flow...
<var name="myfancymodel" class="com.webflow.model.MyFancyModel" />
...and referenced that model later on in the view-state:
<view-state id="login" view="myview/step1" model="myfancymodel">
Suddenly, things worked It's just important that the input fields in the JSP have a "name" parameter that matches the name of fields inside the model. The model class also has to implement "Serializable".
Tags for this Thread