Chapter 5
JavaServer Faces Technology
JavaServer Faces technology is a server-side user interface component framework for building Java technology-based web applications.
The main components of JavaServer Faces technology are as follows:
An API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features
Various tag libraries for expressing UI components within web pages and for wiring components to server-side objects
JavaServer Faces technology provides a well-defined programming model and various tag libraries. These features significantly ease the burden of building and maintaining web applications with server-side UIs. With minimal effort, you can:
Construct a UI with reusable and extensible components
Drop components onto a page by adding component tags
Wire component-generated events to server-side application code
Bind UI components on a page to server-side data
Save and restore UI state beyond the life of server requests
JavaServer Faces 2.0, included in Java EE 6, is a major revision of the specification and introduces several new features that greatly enhance the process of development and deployment of JavaServer Faces based web applications.
The following are some of the new features that are supported by JavaServer Faces 2.0:
Facelets as presentation technology for JavaServer Faces
Templating and Composite Components through Facelets
New HTML tags for easier page creation
Bookmarkability with new tags: h:button and h:link
New components and event types for additional functionality
Resource registration using Annotations
Resource relocation through Annotations
Implicit Navigation Rules
Support for Bean Validation based on JSR 303
Project Stage to describe the status of the application in the project life cycle
Support for Ajax with f:ajax tag and the JavaServer Faces JavaScript Library (jsf:ajax)
Some of the above new features are covered in more detail in the next chapters of this tutorial. The features that are considered advanced topics, are covered in Java EE 6 Tutorial, Volume II: Advanced Topics.


