The JavaServer Faces (JSF) 2.0 samples demonstrate three new features added to JSF 2.0: Ajax, templating, composite components. The samples show you how to create, process and render Ajax requests, along with using templates to create a standard layout for an application and composite components to create reusable components complete with their own converters, validators, renderers, and listeners.
15 minutes
To use the samples, download JavaServer Faces 2.0 sample files from a product download site. Complete the following steps:
Using Ajax in your application saves you from processing and rendering an entire page view for a particular action. You can update specific components by using an Ajax request to process and render only the necessary part of a view, using the f:ajax tag.
Templating is useful for applications with a common flow, such as a header and footer on each page. Using templating enables you to easily modify the content of your pages, while keeping the general layout the same. Composite components enable you to package JSF components with their own converters, validators, renderers, and listeners as one reusable component. This module shows you how to use templating and composite components in an application.