I’m using JSF2 and PrimeFaces3. How can I write selectOneMenu that would invoke JSF navigation to redirect user to another page when he change option in menu?
I’m using JSF2 and PrimeFaces3. How can I write selectOneMenu that would invoke JSF
Share
Attach an ajax listener and let it navigate by
NavigationHandler.E.g.
(the above example expects
page1.xhtml,page2.xhtmlandpage3.xhtmlin the same context; you can even make it a<f:selectItems>instead)with
The
?faces-redirect=trueis not necessary, but it effectively sends a redirect so that the URL in browser address bar will properly change which is better for user experience and bookmarkability of the pages.