Tuesday, May 31, 2011

JSF: Navigating between JSF pages programmatically


public class NavigationHandler {
  public void navigate(String navigateTo){
     FacesContext fctx = FacesContext.getCurrentInstance();
     Application application = fctx.getApplication();
     NavigationHandler navHandler = application.getNavigationHandler();
     navHandler.handleNavigation(fctx,null, "name of navigation case");
  }
}

1 comment :

  1. What happen if you implement this method in a SSL context using an offloading method?

    ReplyDelete