Hi,
I am new to spring-webflow and I am not able to make transition from <view-state> to another state.
Below is my code from "dispatcher-servlet.xml" file:
And following is code from "pizzaOrderFlow.xml":Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd"> <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter"> <property name="flowExecutor" ref="flowExecutor" /> </bean> <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"> <property name="flowRegistry" ref="flowRegistry"/> <property name="order" value="0"/> </bean> <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"> <webflow:flow-execution-repository max-executions="1" /> </webflow:flow-executor> <webflow:flow-registry id="flowRegistry"> <webflow:flow-location path="/WEB-INF/flows/pizzaOrderFlow.xml" id="flow" /> </webflow:flow-registry> </beans>
Code:<?xml version="1.0" encoding="UTF-8"?> <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" start-state="hello"> <view-state id="hello" view="/jsp/hello.jsp"> <transition on="continue" to="existingCustomer"></transition> </view-state> <end-state id="existingCustomer" view="/jsp/existingCustomer.jsp"></end-state> </flow>
The problem is:
"Hello.jsp" page gets rendered but then I am not able to make transition on click of "continue" button to "existingCustomer.jsp" page.
Below is my "Hello.jsp" file code:
Please guide me..!Code:<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Hello..!</title> </head> <body> Hello !<br> <form action="flow" method="get"> <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"> Your phone number? <input type="text" size="10" name="phoneNumber"><br> <input type="submit" name="_eventId_continue" value="Continue"/> <a href="flow?_flowExecutionKey=${flowExecutionKey}&_eventId=_eventId_continue">Go to next page...!</a> </form> <br>PHONE: ${requestParameters.phoneNumber } </body> </html>
Thanks in advance,
AkshayL.


Reply With Quote