JSF Basic Tags

JSF is provided with standard html tag library. For this we you need to use following namespace:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"/>

Following are the tags:

1. h:inputText

You can use tag to render a HTML input of type="text", text box.

2. h:inputSecret

You can use the tag to render a HTML input of type="password", password field.

3. h:inputTextarea

You can use the tag to render a HTML textarea field.

4. h:inputHidden

You can use tag to render a HTML hidden value field.

5. h:selectBooleanCheckbox

You can use tag to render a single HTML input element of "checkbox" type.

6. h:selectManyCheckbox

You can use tag to render a set of HTML input element of "checkbox" type.

7. h:selectOneRadio

You can use tag to render a set of HTML input element of "radio" type.

8. h:selectOneListbox

You can use tag to render a single select listbox.

9. h:selectManyListbox

You can use tag to render a multiple select listbox.

10. h:selectOneMenu

You can use tag to render a dropdown box.

11. h:selectManyMenu

You can use tag to render a multiple select dropdown box.

12. h:outputText

You can use tag to display plain text.

13. h:outputFormat

It is similar to tag, with extra functionality to render parameterized message.

14. h:graphicImage

You can use tag to render a HTML "img" element.

15. h:outputScript

you can use tag to render a HTML "script" element.

16. h:outputStylesheet

You can use output use a css file.

17. h:commandButton

You can use tag to render HTML input element of type button.

18. h:Link

You can use tag to render a HTML "a" anchor element. "outcome" attribute is used to determine the target URL.

19. h:commandLink

You can use tag to render a HTML "a" anchor element. "action" attribute is used to determine the target URL.

20. h:outputLink

You can use tag to render a HTML "a" anchor element. "href" attribute is used to determine the target URL.

21. h:panelGrid

You can use "h:panelGrid" tag to generate HTML table tags to place JSF components in rows and columns layout.

22. h:message

You can use tag to output a single message for a specific component.

23. h:messages

You can use tag to output all message in current page.