Looking for a JavaEE Architect or Potential Tech Co-Founder?
Please don't hesitate to contact me.

How to redirect manually in JSF

There are times when we need to redirect manually in JSF. For example in page load we do some event and after that redirect to some page. This is how we would do it:

FacesContext ctx = FacesContext.getCurrentInstance();
ConfigurableNavigationHandler nav = (ConfigurableNavigationHandler)
ctx .getApplication().getNavigationHandler();

//navigation should be defined in faces-config.xml
nav.performNavigation("navigation");
How to redirect manually in JSF How to redirect manually in JSF Reviewed by Edward Legaspi on Monday, July 22, 2013 Rating: 5

No comments:

Powered by Blogger.