JSF Navigation Example
Managed beans, explained later in this lesson, are Java classes that are managed in the faces-config.xml configuration file. In this example, the code from the managed bean class determines the value that is returned and then used by the navigation case.
public class MyBean {
public MyBean() {}
public String navAction() { if (<check some condition>) { return "success"; }
else
{ return "failure"; }
}
}