First page Back Continue Last page Graphics

A request comes in through the JSF servlet.


Notes:

JSF Request Life Cycle: Restore View

In the restore view phase of the JSF life cycle, a request comes through the FacesServlet controller. The controller examines the request and extracts the view ID, which is determined by the name of the JSP page.

The JSF framework controller uses the view ID to look up the components for the current view. If the view does not already exist, the JSF controller creates it. If the view already exists, the JSF controller uses it. The view contains all the graphical user interface (GUI) components.

This phase of the life cycle presents three view instances: new view, initial view, and postback, with each one handled differently. In the case of a new view, JSF builds the view of the Faces page in the form of a component tree, and it wires the event handlers and validators to the components. The view is saved in a FacesContext object, which holds all the information needed to process a single request. The FacesContext object can be accessed by all the components of the application, event handlers, converters, and validators.