Skip to Main Content
Mastering JavaServer Faces 2.2
book

Mastering JavaServer Faces 2.2

by Anghel Leonard
June 2014
Intermediate to advanced content levelIntermediate to advanced
578 pages
12h 2m
English
Packt Publishing
Content preview from Mastering JavaServer Faces 2.2

Overriding JSF renders

The main responsibilities of a Renderer consists of generating the appropriate client-side markup, such as HTML, WML, and XUL, and converting information coming from the client to the proper type for the component.

JSF provides a set of built-in renders and has the capability to extend them with custom behavior. If you consider a proper workaround to override a built-in render, then perform the following steps:

  1. Extend the desired built-in renderer (for example, Renderer, TextRenderer, LabelRenderer, MessagesRenderer, and so on).
  2. Override the built-in renderer methods.
  3. Configure the new renderer in faces-config.xml or using the @FacesRenderer annotation.

Well, let's see some examples of writing a custom render. For example, let's ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9781782176466Supplemental Content