HTML and CSS Reference
In-Depth Information
Restore View
Request
Apply Request
Values
Process
Validations
Update Model
Values
Invoke
Application
Render
Response
Response
Figure 1-7.
The JSF request processing phases
The six phases are as follows:
•
Restore View.
•
Apply Request Values.
•
Process Validations.
•
Update Model Values.
•
Invoke Application.
•
Render Response.
Restore View
Every JSF page is represented on the server as a tree of UI components that has one-to-one mapping with the user
interface in the client (browser). In order to understand this correctly, let's see an example. Listing 1-11 shows a JSF
XHTML page that allows the user enters his/her favorite food, beverage, and sport.
Listing 1-11.
The favorites.xhtml Page
<html xmlns="
http://www.w3.org/1999/xhtml
"
xmlns:h="
http://java.sun.com/jsf/html
"
>
<h:head>
<title>Your Favorites</title>
</h:head>
<h:body>
<h:form id="favForm">
<h:panelGrid columns="3">
<h:outputText value="Favorite Food"></h:outputText>
<h:inputText id="favoriteFood" value="#{favorite.food}" required="true">
</h:inputText>















