In JSF and Facelets tags, what exactly are these prefixes?
For example: h:head
c:catch
f:event
ui:decorate
etc.
The JSF Tag libraries are used to add components on the web pages and connect components with objects on the server. It also contains tag handlers that implements the component tag. With the help of these features and tools, you can easily and effortlessly create server-side user interface.
JSF basic tags by JSF framework provides a standard HTML tag library. Each tag will rendered into corresponding html output. To use these html tags we have to use the following namespaces of URI in html node.
One of the interesting Tag available in JSF Core Tag library is the Facet Tag. One can normally see the usage of a facet Tag in the case of a Complex UI Components ( PanelGrid and DataTable) that has Parent-Child Relationship.
One of the most compelling aspects of JSF's UI Component technology is it's pluggable rendering capability. JSF UI Components have the ability to render themselves differently depending on the client type viewing the component.
A prefix is used to qualify a tag as belonging to a specific tag library or in XML speak a namespace. The prefixes are declared in some way at the top of a JSF page (how depends on if you are using JSP or Facelets). An "h" usually corresponds to the HTML library but you could use any letter (or word) you wanted as the prefix. The common mappings are:
h http://java.sun.com/jsf/html
f http://java.sun.com/jsf/core
c http://java.sun.com/jsp/jstl/core
fn http://java.sun.com/jsp/jstl/functions
ui http://java.sun.com/jsf/facelets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With