4 Replies Latest reply on Jan 6, 2009 11:08 AM by ptr83

    Redirect using handleNavigation with Richfaces

    ptr83

      Hi.

      I am trying to "redirect" from one page to another from a bean.

      I use this code :

      FacesContext context=FacesContext.getCurrentInstance();
       Application application2=context.getApplication();
       NavigationHandler navigation=application2.getNavigationHandler();
       navigation.handleNavigation(context,null,"ACCESSDENIED");
       context.responseComplete();


      With this navigation rule :

      <navigation-rule>
       <navigation-case>
       <from-outcome>ACCESSDENIED</from-outcome>
       <to-view-id>/error.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>


      When I just use JSF (not Richfaces) in my project in works fine.

      With Richfaces, it is nearly working, but instead of going to error.jsp, the browser show me a blank page.

      I searched on the internet I found this topic : http://www.icefaces.org/JForum/posts/list/2533.page wich speaks about ICEfaces but it seems to be the same problem so perhaps it is linked?

      Or perhaps I am doing something wrong...

      Thanks for your help