Backing Beans
Backing Beans
calls the action method referenced by the component that triggered the event. The action
method returns a logical outcome to the action listener.
The listener passes the logical outcome and a reference to the action method that produced the
outcome to the default NavigationHandler. The NavigationHandler selects the page to
display next by matching the outcome or the action method reference against the navigation
rules in the application configuration resource file by the following process:
1. The NavigationHandler selects the navigation rule that matches the page currently
displayed.
2. It matches the outcome or the action method reference it received from the default
ActionListener
with those defined by the navigation cases.
3. It tries to match both the method reference and the outcome against the same navigation
case.
4. If the previous step fails, the navigation handler attempts to match the outcome.
5. Finally, the navigation handler attempts to match the action method reference if the
previous two attempts failed.
When the NavigationHandler achieves a match, the render response phase begins. During this
phase, the page selected by the NavigationHandler will be rendered.
For more information on how to define navigation rules, see
For more information on how to implement action methods to handle navigation, see
For more information on how to reference outcomes or action methods from component tags,
see
Backing Beans
A typical JavaServer Faces application includes one or more backing beans, each of which is a
JavaServer Faces managed bean that is associated with the UI components used in a particular
page. Managed beans are JavaBeans components (see
that you can configure using the managed bean facility, which is described in
. This section introduces the basic concepts on creating, configuring, and
using backing beans in an application.
Creating a Backing Bean Class
In addition to defining a no-arg constructor, as all JavaBeans components must do, a backing
bean class also defines a set of UI component properties and possibly a set of methods that
perform functions for a component.
Backing Beans
Chapter 10 · JavaServer Faces Technology
309