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 10. JSF Custom Components

JSF is a component-based framework, and JSF custom components are the major proof that sustain JSF flexibility and extensibility. In order to write custom components or extend the existing ones, JSF provides a powerful API that allows us to develop two types of components: custom components, and, from JSF 2.0 onwards, composite components. A custom component implementation is responsible for providing an aspect (optional for non-UI components, such as custom validators, converters, and renderers) and a behavior. Usually the decision to write custom components and the skills for accomplishing it belong to advanced JSF developers.

Before you decide to write a custom component, which can be a time-consuming task, you have to overview the following bullets (especially the first bullet):

  • Check the Internet (for example, http://jsfcentral.com/) to make sure the component doesn't exist yet. Many JSF extensions, such as PrimeFaces, ICEfaces, OmniFaces, and RichFaces...