pageflow problems
mcclurexl Jun 8, 2006 9:24 AMHi,
I have an application with several pages, each linked with a next and a previous button without any decision in it. My pageflow is dying within the second page. The flow starts correct with the first site. After pushing the next button the second site is loaded. Then neither the back nor the next button works. The jsp-sites are labeled correctly. I found a similar problem in this forum but this topic didn't help.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=79274
I also tried to expand the numberguess-example with another site after the win.jsp and/or lose.jsp. This also didn't work, the pageflow stops after the second site. There are no errormessages on jboss-console.
Has anybody an idea?
I'm using Seam 1.0.0.CR3 with jBoss 4.0.4.GA. Here are the workflow-definiton, the first three .jsp-sites and the JavaBean.
Thanks,
Frank
<?xml version="1.0" encoding="UTF-8"?> <pageflow-definition name="purchaseOrder1"> <start-page name="PurchaseStartPage"> <redirect/> <transition name="toship" to="ShipTo"></transition> </start-page> <page name="ShipTo" view-id="/shipTo.jsp"> <redirect/> <transition name="tostart" to="PurchaseStartPage"></transition> <transition name="tobill" to="BillTo"></transition> </page> <page name="BillTo" view-id="/billTo.jsp"> <redirect/> <transition name="topay" to="PaymentMethod"></transition> <transition name="toship" to="ShipTo"></transition> </page> <page name="PaymentMethod" view-id="/paymentMethod.jsp"> <redirect/> <transition name="tobill" to="BillTo"></transition> <transition name="toitem" to="Item"></transition> </page> <page name="Item" view-id="/item.jsp"> <redirect/> <transition name="toreceipt" to="Receipt"></transition> <transition name="topay" to="PaymentMethod"></transition> </page> <page name="Receipt" view-id="/receipt.jsp"> <redirect/> <end-conversation transition="end"/> </page> </pageflow-definition>
first site
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <html> <head> <title>PurchaseOrder1</title> </head> <body> <h1>PurchaseOrder Startpage</h1> <f:view> <h:form> <h:outputText value="Test: #{purchaseOrder1.number}" rendered="true"/> <br/> <h:commandButton type="submit" value="new Order" action="toship"/> </h:form> </f:view> </body> </html>
second site
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <html> <head> <title>PurchaseOrder1</title> </head> <body> <h1>shipTo</h1> <f:view> <h:outputText value="Test: #{purchaseOrder1.number}" rendered="true"/> <br/> <h:commandButton type="submit" value="previous" action="tostart"/> <h:commandButton type="submit" value="next" action="tobill"/> </f:view> </body> </html>
third site
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <html> <head> <title>Pageflow1.</title> </head> <body> <h1>billTo</h1> <f:view> <h:commandButton type="submit" value="next" action="toship"/> <h:commandButton type="submit" value="previous" action="topay"/> </f:view> </body> </html>
JavaBean
import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Begin; import org.jboss.seam.annotations.Create; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; @Name("purchaseOrder1") @Scope(ScopeType.CONVERSATION) public class PurchaseOrder1 { private boolean stateIt = false ; private int number = 100 ; @Create @Begin(pageflow="purchaseOrder1") public void begin() { number = 101 ; } public boolean isTransmit() { if (stateIt) { stateIt = false ; return true ; } else { stateIt = true ; return false ; } } public int getStateIt() { if (stateIt) return 11 ; else return 1 ; } public int getNumber() { return this.number ; } }