2 Replies Latest reply on May 24, 2006 4:37 PM by Gavin King

    Reusing Pageflow on different parts of application

    Peter Repinc Newbie

      Hello!

      My question is. Is it possible to reuse pageflows on different parts of application. What I would want to do is shown in the following example:

      Just imagine that we have defined following imaginary pageflow:

      <pageflow-definition name="newObject">
       <start-state name="start">
       <transition name="start" to="selectClass"></transition>
       </start-state>
       <page name="selectClass" view-id="/selectClass.xhtml">
       <redirect />
       <transition name="select" to="createObject">
       <action expression="#{newObjectManager.selectClass}" />
       </transition>
       <transition name="cancel" to="end" />
       </page>
       <page name="createObject" view-id="/createObject.xhtml">
       <event type="node-enter">
       <action expression="#{newObjectManager.createObject}" />
       </event>
       <redirect />
       <transition name="ok" to="end">
       <action expression="#{newObjectManager.confirmCreation}" />
       </transition>
       <transition name="cancel" to="end" />
       </page>
       <end-state name="end">
       <end-conversation />
       </end-state>
      </pageflow-definition>
      


      I dont know if I can use end-state. What I would love to have is that when this pageflow reach end state that would mean that we want to return to the calling page. In this way I could reuse pageflows on different parts of application. I could then have two different pages which could use same pageflow and on completition of pageflow navigation would return to the calling page.

      I could even call pageflow inside another pageflow which would on completition return to the calling pageflow.

      In this way I could even break big pageflow into smaller reusable parts. Is this hard to implement.

      Silvo Koren