[OmniFaces utilities] The
navigate()
method perform the JSF navigation to the given outcome.Method:
See also: Faces#getContext()
Usage:
We can use
this method to navigate from a void bean method, as below:
index.xhtml
-> pass through LoginBean.loginAction() -> navigate to welcome.xhtml
//in LoginBean
import
org.omnifaces.util.Faces;
...
public void
loginAction(){
// some login stuff
Faces.navigate("welcome");
}
Niciun comentariu :
Trimiteți un comentariu