Announcement Announcement Module
No announcement yet.
Getting started with Web Flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

    I tried various things in the XML-configuration (<input> and <var>), none of them worked. I don't want to include any kind of Javascript/JSF/AJAX/whatever, I'd just like to see the basic principle to handle user input data across various flows.

    Thanks for your time and attention,


  • #2
    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".