img
Figure 18-20. Add contact : review information
Step 4: Add Contact Complete
Take a look at the code snippet in Listing 18-21, which was extracted from the start state in the flow
definition in Listing 18-5 (flow.xml).
Listing 18-21. Navigate from Review to Complete Add Contact
<view-state id="review" view="review.xhtml">
<transition on ="next" to="complete">
<evaluate expression="contactController.saveContact(flowRequestContext)"/>
</transition>
<transition on="back" to="add-step-2"/>
</view-state>
<view-state id="complete" view="complete.xhtml">
<transition on="continue" to="finish"/>
</view-state>
<end-state id="finish"/>
In Listing 18-21, which enables the transition from review to complete state, the complete and end
states are highlighted in bold. During the transition, the ContactController.saveContact() method will
be called, which persists the Contact object, and then the complete view will be displayed. Listing 18-22
shows the implementation of the saveContact() method.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home