4 Replies Latest reply on Sep 28, 2011 12:20 PM by Rémi Magnin

    Simple navigation problem

    Rémi Magnin Newbie

      Hello,


      I've a very simple navigation problem.
      I've got an xhtml file liste.xhtml and a liste.page.xml file.
      I would like to redirect users when they try to access directly this page and the proper data have not been initalized.


      In my liste.page.xml, I've done somrthing like that :


      <navigation>
        <rule if="#{action.datas == null or action.datas.isEmpty()}">
          <redirect view-id="/pages/empty.xhtml"/>
        </rule>
      </navigation>



      But it seems to be ignored.
      When I add an action tag at the beginning of the file, the navigation works, but the method isn't useful (it's empty) :


      <action execute="#{action.nothing()}"/>
      
      <navigation>
        <rule if="#{action.datas == null or action.datas.isEmpty()}">
          <redirect view-id="/pages/empty.xhtml"/>
        </rule>
      </navigation>



      Is there a cleaner way to do that ?