Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly do h: c: f: and ui: denote in JSF tag library?

In JSF and Facelets tags, what exactly are these prefixes?

  • h:
  • c:
  • f:
  • ui:

For example: h:head c:catch f:event ui:decorate etc.

like image 460
exexzian Avatar asked Jul 24 '12 23:07

exexzian


People also ask

What is the JSF tag library?

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.

How to use basic HTML tags by JSF framework?

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.

What is facet tag in JSF?

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.

Are JSF UI components pluggable?

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.


1 Answers

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
like image 108
Chase Avatar answered Oct 16 '22 14:10

Chase