pageflow problems again
ido_tamir Mar 15, 2006 2:22 PMHello,
I am having again problems with pageflows.
I don't know what I am doing wrong therefore I post full config files.
The problem is simple: the pageflow immediately executes the first
transition it finds, and dies at the second page. (seam is from todays cvs).
thank you very much for suggestions
sincerely
ido
<?xml version="1.0"?> <pageflow-definition name="testFlow"> <start-state name="start"> <transition to="one"></transition> </start-state> <page name="one" view-id="/one.jsf" redirect="true"> <transition name="testA" to="two"></transition> <transition name="testB" to="end"></transition> </page> <page name="two" view-id="/two.jsf" redirect="true"> <transition name="testA" to="end"></transition> <transition name="testB" to="end"></transition> </page> <page name="end" view-id="/end.jsf"> <end-conversation/> </page> </pageflow-definition>
<faces-config> <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> <lifecycle> <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener> </lifecycle> </faces-config>
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class> org.apache.myfaces.webapp.StartupServletContextListener </listener-class> </listener> <listener> <listener-class> org.jboss.seam.servlet.SeamListener </listener-class> </listener> <filter> <filter-name>Seam Exception Filter</filter-name> <filter-class> org.jboss.seam.servlet.SeamExceptionFilter </filter-class> </filter> <filter> <filter-name>Seam Redirect Filter</filter-name> <filter-class> org.jboss.seam.servlet.SeamRedirectFilter </filter-class> </filter> <filter-mapping> <filter-name>Seam Redirect Filter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Seam Exception Filter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping> <context-param> <param-name>org.jboss.seam.core.init.componentClasses</param-name> <param-value>org.jboss.seam.core.Jbpm</param-value> </context-param> <context-param> <param-name>org.jboss.seam.core.jbpm.pageflowDefinitions</param-name> <param-value>pageflow.jpdl.xml</param-value> </context-param> <!-- 120 second conversation timeout --> <context-param> <param-name> org.jboss.seam.core.manager.conversationTimeout </param-name> <param-value>120000</param-value> </context-param> <!-- MyFaces --> <context-param> <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> </web-app>
@Name("pf")
@Stateful
@Scope(ScopeType.CONVERSATION)
@Interceptors(SeamInterceptor.class)
//@Intercept(InterceptionType.ALWAYS)
//@Conversational(ifNotBegunOutcome="start")
public class PageFlowAction implements PageFlow {
@Begin(join=false,pageflow="testFlow")
public void begin() {}
@Destroy @Remove
public void destroy(){}
}one and two are almost identical (header is different)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>test</title> </head> <body id="body"> <h1>One</h1> <h:form> <h:commandLink action="testA" value="a"/> <h:commandLink action="testB" value="b"/> </h:form> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>
<body id="body">
<h1>start</h1>
<h:form>
<p><h:commandLink action="#{pf.begin}" value="start"/>
<!--f:param name="conversationId" value="new"/-->
</p>
</h:form>
</body>
</html>