JSF - Facelets Tags


Advertisements


JSF provides special tags to create common layout for a web application called facelets tags. These tags provide flexibility to manage common parts of 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.No Tag & Description
1 Templates

We'll demonstrate how to use templates using the following tags

  • <ui:insert>
  • <ui:define>
  • <ui:include>
  • <ui:composition>
2 Parameters

We'll demonstrate how to pass parameters to a template file using the following tag

  • <ui:param>
3 Custom

We'll demonstrate how to create custom tags

4 Remove

We'll demonstrate capability to remove JSF code from generated HTML page



Advertisements