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 |
|
Boolean Input |
|
Selection |
|
All of the examples for these tags share a common structure.
The demonstration examples are all in one application. They have the same structure:
Java classes (Source Packages/tag-name/):
JSF pages (Web Pages/tag-name/):
Configuration files (Web Pages/WEB-INF/:
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 |