Facelet Tags Library – JSF Facelets UI Tags Library and Reference

There could be several tags in JSF and Facelets but with the help of this blog story on Facelets UI Tags, I’ll try to explain all the UI tags in facelets.

Given Below are the List of UI faceletes tags…

  1. ui:component
  2. ui:composition
  3. ui:debug
  4. ui:decorate
  5. ui:define
  6. ui:fragment
  7. ui:include
  8. ui:insert
  9. ui:param
  10. ui:remove
  11. ui:repeat

Now lets see what is the use of these UI tags in Facelets one by one…

1. ui:component - If you want to insert a new instance in to the JSF component tree, Use the UI Component tag. As it’s really designed to do the same thing!

While inserting new instance of UI Component please keep in mind that it must be defined inside the particular tag, as anything which is defined outside this tag will be simply ignored by the JSF view handler.

  1. ui:composition – This tag is basically used to warp the content that means you can use the same content into another facelet.
  2. ui:debug – Used to display information about JSF componenets tree.
  3. ui:decorate - Is a templating tag that can be used to decorate content included from another Facelet as well.
  4. ui:define – used to define name content that will be inserted into a template.
  5. ui:fragment – It can be consider as a ui:component but still its different. It inserts new UI component instance into the JSF component tree.
  6. ui:include - For including a document that uses “src” attributes.
  7. ui:insert – To inserting a template and uses ui:define tags to pass values within facelets.
  8. ui:param – used to pass objects between facelets as a name variable.
  9. ui:remove – use when you want to remove something or wanted to restrict from to be display.
  10. ui:repeat – when you want to iterate over a collection of objects.

This is just an introduction about UI facelet tags in JSF. I will show you some more definition with examples in coming stories. Where you will learn how to use these ui tags in JSF and their syntax to use.

For working on this technology you must have prior knowledge of java and JSF. You can find these tutorials on IT Technologies based website such as http://www.roseindia.net/java or http://www.roseindia.net/jsf

Leave a Reply

You must be logged in to post a comment.