2 Replies Latest reply on Sep 12, 2007 1:35 PM by nayanj

    pages.xml question

    nayanj

      I need to redirect users to a specific page if an attribute in session is true. It does not matter what link the user clicks.. I wrote the following rule but it does not seem to work:

       <page view-id="*">
       <navigation>
       <rule if="#{identity.loggedIn and user.myattribute}">
       <begin-conversation join="true"/>
       <redirect view-id="/mypage.xhtml"/>
       </rule>
       </navigation>
       </page>
      


      Can anyone suggest how this should be done?

        • 1. Re: pages.xml question
          damianharvey

          I think that you need a page action called on each page and a "from-action" attribute in your navigation element. You can provide it a dummy method that essentially does nothing. eg:

          <page view-id="*" action="#{myBean.doNothing}">
           <navigation from-action="#{myBean.doNothing}">
          


          Cheers,

          Damian.

          • 2. Re: pages.xml question
            nayanj

            Thanks! That worked.