The JSF HTML input tags can be classified as shown below. These tags must be in a <form> tag. Otherwise their input will not be sent when a request is made.

Text Input
  • h:inputText
  • h:inputTextarea
  • h:inputSecret
Boolean Input
  • h:selectBooleanCheckbox
  • h:selectOneListbox
  • h:selectOneRadio
  • h:selectOneMenu
  • h:selectManyCheckbox
  • h:selectManyListbox
  • h:selectManyMenu

All of the examples for these tags share a common structure.

The demonstration examples are all in one application. They have the same structure:

The three text input tags have distinct purposes as shown in the table below:

Tag Purpose
h:inputText short text, numbers, dates, currency
h:inputTextarea long text
h:inputSecret passwords

The selection tags come in two varieties:

There are three widget type options for both of these varieties. The choice of the widget type is determined by ease of use and screen space considerations.

Tag Ease of Use Screen Space
h:selectOneListbox easiest less compact
h:selectOneRadio easiest least compact
h:selectOneMenu easy most compact
Tag Ease of Use Screen Space
h:selectManyCheckbox easiest least compact
h:selectManyListbox easy less compact
h:selectManyMenu difficult most compact