In this chapter, we will cover:
Our goal for this chapter is to cover the main aspects regarding Facelets technology. As you probably know, Facelets is the name behind JavaServerTM Faces View Definition Framework and basically it represents a page declaration language that can be used with JavaServer Faces technology (in many aspects it is similar to Tapestry). Most usually, Facelets is used to build JavaServer Faces views using HTML style templates and to build component trees (not a servlet as with JSP). While doing this, it provides some important features, such as the following:
If the previous list was not a strong argument for you to try Facelets in your applications, then you probably should know that starting with JSF 2.0, Facelets is a part of JavaServer Faces specification and the recommended and preferred presentation technology to use in conjunction with JSF.
In this chapter, we will start by with a recipe that describes how to install Facelets (for JSF under 2.0) and we will continue by exploring features like templating, creation of composition components, passing sub-elements and actions to composite components, and more.