Results 1 to 2 of 2

Thread: Getting started with Web Flow

  1. #1
    Join Date
    Feb 2012
    Posts
    2

    Default 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,

    Jan

  2. #2
    Join Date
    Feb 2012
    Posts
    2

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •