The navigation model in the JSF framework
The JSF framework has a very flexible navigation model which decouples navigation rules from the JSF page as well as from underlying business logic.
The JSF 2.0 navigation model supports two types of navigations:
Rule based navigation
Implicit navigation
Rule based navigation
The core JSF navigation model is built
based on navigation rules which decide the next page in the navigation flow in response to the outcome produced by the actionable UI components. JSF uses a
faces-config.xml
file to store all the navigation rules and managed beans used in the application. The following is an example for navigation rules defined in faces-config.xml
.
<navigation-rule> <from-view-id>/department.jsf</from-view-id> <navigation-case> <from-outcome>viewEmployees</from-outcome> <to-view-id>/employee.jsf</to-view-id> </navigation-case> </navigation-rule>
In this example, the framework will navigate...