It is a light weight page declaration language which is used to build JavaServer Faces views using HTML style.
It includes the following features:
JavaServer Faces technology supports various tag libraries to add components to a web page. To support the JavaServer Faces tag library mechanism, Facelets uses XML namespace declarations.
The following table shows tag libraries supported by Facelets.
The Lifecycle of a Facelets Application
The JavaServer Faces specification defines the lifecycle of a JavaServer Faces application. The following steps describe that process to a Facelets-based application.
1) Lifecycle starts when a client makes a new request for a web page which is created using Facelets. JSF creates a new component tree or javax.faces.component.UIViewRoot and placed into the FacesContex.
2) View is ready to populate with components for rendering. The UIViewRoot if available is applied to the Facelets.
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 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, the Step 2 is continued.
9) New view is rendered back as a response to the client.