Spring Webflow Code example - Part IV
For previous parts: For Part-I click on: Spring Webflow Code example - Part I For Part-II click on: Spring Webflow Code example - Part II For Part-II click on: Spring Webflow Code example - Part III Lets create the third page which is to provide a complementary drinks, if the user has selected 'Indian Spicy Pizza'. Now since this page needs to be shown conditionally, we need to make use of 'action-state' element. Using this, we can evaluate a condition and then make the transition accordingly. In the view-state for 'selectPizza', insert the transition for 'next' to a state 'complementaryDrinks'. This will actually be a action state as shown below. Note the action state 'complementaryDrinks' will invoke a method hasComplementaryDrinks() to determine the transition. Modify the pizza-order-flow.xml as below: <view-state id="selectPizza" model="viewScope.newpizza"> <on-render> ...