2 Replies Latest reply on Jan 4, 2008 1:13 PM by tom_goring

    Page Flow Start Question

    tom_goring

      Hi,

      I have a simple page flow and want to know how to link to it from another page. I do not want to reference the start page but the page flow. All the examples I can see link using the start page (for me that will be determined when the flow starts).

      I.e. I want to do something like:

      .. some other page...
      <s:button value="New Starter" pageflow="ContractorJoinWizard"/>
      


      <pageflow-definition
       xmlns="http://jboss.com/products/seam/pageflow"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
       name="ContractorJoinWizard">
      
       <start-state name="Start">
       <transition to="JoinWizardPickScheme"></transition>
       </start-state>
      
       <start-page name="JoinWizardPickScheme" view-id="/contractor/JoinWizardPickScheme.xhtml">
       <redirect/>
       <transition name="next" to="JoinWizardComplete"/>
       <transition name="cancel" to="JoinWizardComplete"></transition>
       </start-page>
      
       <page name="JoinWizardComplete" view-id="/contractor/JoinWizardComplete.xhtml">
       <end-conversation/>
       <redirect/>
       </page>
      
      </pageflow-definition>
      


      Thanks in advance

        • 1. Re: Page Flow Start Question
          tom_goring

          Hi..

          this seems to work:

          <s:link value="New Contractor...1" action="#{contractorJoinWizard.startFlow}" propagation="begin" pageflow="ContractorJoinWizard"/>
          


          I.e. you need a dummy backing bean and add the extra propagation="begin".

          Only thing now is I'm getting this in the log:
          sourceId=null[severity=(WARN 1), summary=(Illegal navigation), detail=(Illegal navigation)]
          


          I read a bit more info here:
          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115558

          Anyone know the correct way to do this?

          thanks

          Tom




          • 2. Re: Page Flow Start Question
            tom_goring

            Ok I've got to the bottom of this (by re-reading the docs) and with the help of the new error.

            1) Add you link as follows:

            <s:button value="New Contractor..." action="#{contractorJoinWizard.beginFlow}" />
            


            2) Have a backing bean with
             @Begin(pageflow="ContractorJoinWizard",join=true)
             public String beginFlow() {
             log.info("startFlow");
             return "pickScheme";
             }
            


            3) don't mix start-state and start-page (i needed start-state)

            <pageflow-definition
             xmlns="http://jboss.com/products/seam/pageflow"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
             name="ContractorJoinWizard">
            
             <start-state name="Start">
             <transition name="pickScheme" to="JoinWizardPickScheme"></transition>
             <transition name="complete" to="JoinWizardComplete"></transition>
             </start-state>
            
             <page name="JoinWizardPickScheme" view-id="/contractor/JoinWizardPickScheme.xhtml">
             <redirect/>
             <transition name="next" to="JoinWizardComplete"/>
             <transition name="cancel" to="JoinWizardComplete"></transition>
             </page>
            
             <page name="JoinWizardComplete" view-id="/contractor/JoinWizardComplete.xhtml">
             <end-conversation/>
             <redirect/>
             </page>
            
            </pageflow-definition>