JSF - Facelets Tags

Advertisements


Facelets JSF Tags

JSF provides special tags to create common layout for a web application called facelets tags. These tags gives flexibility to manage common parts of a multiple pages at one place.

For these tags you need to use the following namespaces of URI in html node.

<html 
   xmlns="http://www.w3.org/1999/xhtml" 
   xmlns:ui="http://java.sun.com/jsf/facelets" 
>

Following are important Facelets Tags in JSF 2.0:

S.N.Tag & Description
1Templates
We'll demonstrate how to use templates using following tags
  • <ui:insert>

  • <ui:define>

  • <ui:include>

  • <ui:define>

2Parameters
We'll demonstrate how to pass parameters to a template file using following tag
  • <ui:param>

3Custom
We'll demonstrate how to create custom tags.
4Remove
We'll demonstrate capability to remove JSF code from generated HTML page.


Advertisements
Advertisements