JSF/JSF 2.0 HTML
Tag Reference
JSF HTML tags are used for design the page by using
server side code, which is going to render at the client side .To use these tag
in JSF we need to specify the URI (Uniform resource identifier) and prefix
attribute of the taglib directive at the top of your JSP file in HTML tag.
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
Highlighted is the URI for the JSF html tags. And
for the prefix value commonly "h" is used but you can put anything as
value of the prefix attribute of the taglib directive. When you declare any html
tag as a JSF tag then you should write the tag as follows:
<htmlprefixvalue:tagName
attribute1="value" attribute2="value" />.
This is the syntax of specifying the html tag as a
jsf tag.You can take an example of creation an input box by
using JSF html tag as follows:
If the prefix value is "h" then the
syntax will be seen like :
<h:inputText id=”txt” value="Enjoy
Learning "> </h:inputText>.
Below
are given JSF tags might be helpful for your project.
Tag Name
|
Description
|
Since
|
h:body
|
This tag renders an HTML body element.
|
JSF 2.0
|
h:button
|
[ Documentation pending ]
|
JSF 2.0
|
h:column
|
The column tag renders a single column of data within a
data table component.
|
|
h:commandButton
|
The commandButton tag renders an HTML submit button that
can be associated with a backing bean or ActionListener class for event
handling purposes.
|
|
h:commandLink
|
The commandLink tag renders an HTML anchor tag that
behaves like a form submit button and that can be associated with a backing
bean or ActionListener class for event handling purposes.
|
|
h:dataTable
|
The dataTable tag renders an HTML4 compliant table element
that can be associated with a backing bean to obtain its data as well as for
event handling purposes.
|
|
h:form
|
The form tag renders an HTML form element.
|
|
h:graphicImage
|
The graphicImage tag renders an HTML image tag.
|
|
h:head
|
This tag renders an HTML head element.
|
JSF 2.0
|
h:inputHidden
|
The inputHidden tag renders an HTML input element of the
type "hidden".
|
|
h:inputSecret
|
The inputSecret tag renders an HTML input element of the
type "password".
|
|
h:inputText
|
The inputText tag renders an HTML input element of the
type "text".
|
|
h:inputTextarea
|
The inputTextarea tag renders an HTML "textarea"
element.
|
|
h:link
|
[ Documentation pending ]
|
JSF 2.0
|
h:message
|
The message tag renders a message for a specific
component.
|
|
h:messages
|
The messages tag renders all Faces messages for the
current view.
|
|
h:outputFormat
|
The outputFormat tag renders parameterized text and allows
you to customize the appearance of this text using CSS styles.
|
|
h:outputLabel
|
The outputLabel tag renders an HTML "label"
element.
|
|
h:outputLink
|
The outputLink tag renders an HTML anchor tag with an
"href" attribute.
|
|
[ Documentation pending ]
|
JSF 2.0
|
|
h:outputStylesheet
|
[ Documentation pending ]
|
JSF 2.0
|
h:outputText
|
The outputText tag renders basic text on your JSF page.
|
|
h:panelGrid
|
The h:panelGrid tag renders an HTML4 compliant table
element.
|
|
h:panelGroup
|
The panelGroup tag is a container component that renders
its child components.
|
|
h:selectBooleanCheckbox
|
The SelectBooleanCheckbox tag renders an HTML input
element of the type "checkbox".
|
|
h:selectManyCheckbox
|
The SelectManyCheckbox tag renders a list of HTML
checkboxes.
|
|
h:selectManyListbox
|
The SelectManyListbox tag renders an HTML
"select" list of any size with the "multiple" attribute
present.
|
|
h:selectManyMenu
|
The SelectManyMenu tag renders an HTML "select"
element with the "multiple" attribute present and the
"size" attribute set to 1.
|
|
h:selectOneListbox
|
The SelectOneListbox tag renders an HTML
"select" element of any size without the "multiple"
attribute.
|
|
h:selectOneMenu
|
The SelectOneMenu tag renders an HTML "select"
element with a "size" of 1 without the "multiple"
attribute.
|
|
h:selectOneRadio
|
The SelectOneRadio tag renders a table of HTML
"input" elements of the type "radio".
|
Ref:JSFTOOLBOX
Comments
Post a Comment