1 Reply Latest reply on Dec 9, 2009 4:21 PM by Emir Calabuch

    Pageflow with Actions - produces faces lifecycle exception

    Ilya Dyoshin Novice

      good day.


      I'd like to create a simple pageflow with invoking actions from backing bean inside of pageflow:


      I've created a simple pageflow:


      <pageflow-definition name="Заповнення заяви"
           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.2.xsd">
           
           <start-page name="Заповнення номеру та серії" view-id="/zayava/wizard/welcome.xhtml">
                <transition to="Чи вже існує заява" name="continue"/>
           </start-page>
           
           <decision name="Чи вже існує заява" 
                expression="#{zayavaWizard.policiPresent}">
                <transition to="Заява вже присутня в системі" name="true" />
                <transition to="Створення заяви" name="false" />
           </decision>
           
           <action name="Створення заяви" expression="#{zayavaWizard.currentPoliciObject == null ? zayavaWizard.createPoliciObject() : 'continue'}">
                <transition to="Введення застрахованої особи" />
           </action>
      
           <page view-id="/zayava/wizard/zayava_exists.xhtml" name="Заява вже присутня в системі">
                <end-conversation />
                <redirect />
           </page>
      
           <page view-id="/zayava/wizard/zastrahovannoe.xhtml" name="Введення застрахованої особи">
                <redirect />
                <transition to="Створення змінной складової поліса" />
                
           </page>
      </pageflow-definition>




      but when I go into action after decision - I receive faces exception and my application dies.


      So schema allows using actions inside of the pageflow. But they don't work. Any idea?


      Best regards,
      Ilya Dyoshin

        • 1. Re: Pageflow with Actions - produces faces lifecycle exception
          Emir Calabuch Newbie

          As far as I know, <action> tags are allowed inside <transition>s, not as standalone nodes. See chapter 8.2.3. Page nodes and transitions of the Seam Reference Manual to see examples of use of <action>s within pageflows. I transcribe an example here:


          <page name="displayGuess" view-id="/numberGuess.jsp">
              <redirect/>
              <transition to="evaluateGuess">
                  <action expression="#{numberGuess.guess}" />
              </transition>
          </page>