Book Image

Mastering JavaServer Faces 2.2

By : Anghel Leonard
Book Image

Mastering JavaServer Faces 2.2

By: Anghel Leonard

Overview of this book

Table of Contents (20 chapters)
Mastering JavaServer Faces 2.2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The JSF Life Cycle
Index

Chapter 11. JSF 2.2 Resource Library Contracts – Themes

Starting with version 2.0, JSF developers exploit Facelets as the default View Declaration Language (VDL). Facelets provide many advantages, but we are especially interested in using Facelet templates, which represent a mix of XHTML and other resources such as CSS, JS, and images. A Facelet template acts as a base (or a model) for the application pages. Practically, it represents a piece of reusable code that serves as a consistent and standard look and feel for the application pages. In the final chapter of this book, we will get more into the details of Facelets and templating, while in this chapter we will focus on the new JSF 2.2 feature known as Resource Library Contracts.

This new feature fortifies and simplifies the implementation of themes (such as PrimeFaces or RichFaces) by allowing us to easily decorate and use Facelet templates over the entire application in a reusable and flexible approach.

In this chapter, you will see how...