Java Reference
In-Depth Information
javax.faces.component.UIViewRoot is
created
and
placed
in
the
FacesContext .
2. The UIViewRoot is applied to the Facelets, and the view is populated with com-
ponents for rendering.
3. The newly built view is rendered back as a response to the client.
4. On rendering, the state of this view is stored for the next request. The state of input
components and form data is stored.
5. The client may interact with the view and request another view or change from
the JavaServer Faces application. At this time the saved view is restored from the
stored state.
6. The restored view is once again passed through the JavaServer Faces lifecycle,
which eventually will either generate a new view or re-render the current view if
there were no validation problems and no action was triggered.
7. If the same view is requested, the stored view is rendered once again.
8. If a new view is requested, then the process described in Step 2 is continued.
9. The new view is then rendered back as a response to the client.
User Interface Component Model
In addition to the lifecycle description, an overview of JavaServer Faces architecture
provides better understanding of the technology.
JavaServer Faces components are the building blocks of a JavaServer Faces view. A com-
ponent can be a user interface (UI) component or a non-UI component.
JavaServer Faces UI components are configurable, reusable elements that compose the
user interfaces of JavaServer Faces applications. A component can be simple, such as a
button, or can be compound, such as a table, composed of multiple components.
JavaServer Faces technology provides a rich, flexible component architecture that in-
cludes the following:
• A set of javax.faces.component.UIComponent classes for specifying
the state and behavior of UI components
• A rendering model that defines how to render the components in various ways
• A conversion model that defines how to register data converters onto a component
• An event and listener model that defines how to handle component events
• A validation model that defines how to register validators onto a component
Search WWH ::




Custom Search