Making Preview/Confirm page with Spring Web Flow 2
===

I am new to web flow and I am trying to get this sample working.. I have a user enter his registration information on one page and I would like it displayed for preview on the next page.  if the preview is ok the user will click save on the preview page and goto the save page..


Here is my flow:



    <flow xmlns="http://www.springframework.org/schema/webflow"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/webflow
                              http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
    
    	<view-state id="helloworld" view="helloworld.jsp" model="customer">
    	 		<transition on="submit" to="preview"/>
    	</view-state>
    	
    	<view-state id="preview" view="preview.jsp" model="customer">
    	 		<transition on="cancel" to="helloworld"/>
    	</view-state>
    </flow>

Below is the code to my preview.jsp page:

    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    
    <html>
    <head>
    	<title>Spring 3.0 MVC - Web Flow Example</title>
    </head>
    <body>
        You did it... <p><b><i>PLEASE CONFIRM ALL THE INFORMATION BELOW</i></b>
        <p>
        <h2>Customer Registration (preview)</h2>
        
    
          <b>Phone number: </b>${phoneNumber}<br/>
          <b>Name: </b>${name}<br/>
          <b>Address: </b>${address}<br/>
          <b>City: </b>${city}<br/>
          <b>State: </b>${state}<br/>
          <b>Zip Code: </b>${zipcode}<br/>
    	</body>
    	[<a href="${flowExecutionUrl}&_eventId=save">Save</a> | <a href="${flowExecutionUrl}&_eventId=cancel">Cancel</a>]
    </body>
    </html>




