2 Replies Latest reply on Mar 22, 2007 11:48 AM by gavin.king

    Pages.xml navigation and actionListener problem

    artur.chyzy

      I have following pages.xml definition

      <page>
       <navigation>
       <rule if-outcome="persisted">
       <end-conversation before-redirect="true"/>
       <redirect view-id="/list.jspx" />
       </rule>
       <rule if="#{someBean.booleanVariable}" >
       <end-conversation before-redirect="true"/>
       <redirect view-id="/index.jspx" />
       </rule>
       <rule if="#{!someBean.booleanVariable}">
       <end-conversation before-redirect="true"/>
       <redirect view-id="/list.jspx" />
       </rule>
       </navigation>
      
      
      </page>


      I also have following button on form:

      <ice:commandButton value="..." immediate="true" actionListener="#{someBean.openPopup}" />
      

      which should invoke a popup window (or better: invoke an actionListener)

      But when i click on button the redirect is made according to pages.xml using this rule
      <rule if="#{!someBean.booleanVariable}">
       <end-conversation before-redirect="true"/>
       <redirect view-id="/list.jspx" />
      </rule>
      

      bacause booleanVariable is false

      Why pages.xml rules are invoked when i want to use actionListener?
      ActionListener method always return void so there will be no outcome

      Also when I remove rules with if it works ok because it checks only outcomes and they don't match when invoking actionListener

      Am I doing something wrong?
      Can someone tell me why this doesn't work ?

      Artur