2 Replies Latest reply on Sep 11, 2009 4:13 AM by I_dont_want to_tell_you

    Navigation fails in StateAPI example

    I_dont_want to_tell_you Newbie

      I tried to run the example as shown here http://livedemo.exadel.com/richfaces-demo/richfaces/stateAPI.jsf?c=stateAPI

      I copied the sample code into a NetBeans projects, and attempted to run it. However, I cannot get the navigation to work. I can see the login facelet, and on clicking on the 'Register' text I can see the register facelet. But if I enter a username and password, the buttons do nothing (in either facelet). It seems to me that the StateNavigationHandler is not working.

      Also, the example code does not explain clearly how the navigation from the login wizrd xhtml page is supposed to work. From the documentation it seems that I need to map from the outcome of the LoginAction and RegisterAction beans to my facelets. In the code these are the "loggedIn" and "registered" strings. I tried to create two navigation rules in my faces-config file as follows:

      <navigation-rule>
      <from-view-id>/controls/simple.xhtml</from-view-id>
      <navigation-case>
      <from-outcome>registered</from-outcome>
      <to-view-id>/controls/register.xhtml</to-view-id>
      </navigation-case>
      <navigation-case>
      <from-outcome>loggedIn</from-outcome>
      <to-view-id>/controls/login.xhtml</to-view-id>
      </navigation-case>
      </navigation-rule>

      But without success. Does anyone have any idea how this is supposed to work?