2 Replies Latest reply on Mar 2, 2006 11:11 AM by ido_tamir

    Pageflow problems

    ido_tamir

      Hi,
      I am trying to start a pageflow by invoking pf.begin on page start.
      This certainly creates a pageflow - even without @Create.
      (I can change stuff in my pageflow e.g. change "one" to "none" and an exception is thrown etc...).
      But I get no redirect to page one.

      Clicking the outputLink brings me to one.jsf and creates a working pageFlow (only with @Create and pf reference somewhere in one.jsf).

      Why don't I get a redirect when activating the commandLink on the start page and invoking a pageflow?
      (I tried changing join, scope etc...)

      Thank you very much
      ido

      start:
      <h:form>
       <h:commandLink action="#{pf.begin}" value="start"/>
       <h:outputLink value="one.jsf"><h:outputText value="one direct"/></h:outputLink>
      </h:form>
      
      one:
      <h:outputText value="Testing" rendered="#{pf != null}"/>
      <h:form>
       <h:commandLink action="testA" value="a"/>
      </h:form>
      
      pageflow:
      <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="end"></transition>
       </page>
       <page name="end" view-id="/end.jsf">
       <end-conversation/>
       </page>
      </pageflow-definition>
      
      
      Bean:
      @Name("pf")
      @Scope(ScopeType.CONVERSATION)
      public class PageFlowAction implements PageFlow {
       int pc;
      
       @Create
       @Begin(join=true,pageflow="testFlow")
       public void begin() {
       System.err.println("startFlow " + pc++);
       }
       @Destroy @Remove
       public void destroy(){}
      }