Java Reference
In-Depth Information
JSF expressions bind JavaBeans objects with facelets. You will see more use of JSF expres-
sions in the upcoming examples in this chapter.
33.1
What is JSF?
Check
33.2
Point
How do you create a JSF project in NetBeans?
33.3
How do you create a JSF page in a JSF project?
33.4
What is a facelet?
33.5
What is the file extension name for a facelet?
33.6
What is a managed bean?
33.7
What is the @Named annotation for?
33.8
What is the @RequestScope annotation for?
33.3 JSF GUI Components
JSF provides many elements for displaying GUI components.
Table 33.1 lists some of the commonly used elements. The tags with the h prefix are in the JSF
HTML Tag library. The tags with the f prefix are in the JSF Core Tag library.
Key
Point
T ABLE 33.1
JSF GUI Form Elements
JSF Tag
Description
inserts an XHTML form into a page.
h:form
similar to a JavaFX FlowPane.
h:panelGroup
h:panelGrid
similar to a JavaFX GridPane.
h:inputText
displays a textbox for entering input.
h:outputText
displays a textbox for displaying output.
displays a textarea for entering input.
h:inputTextArea
h:inputSecret
displays a textbox for entering password.
h:outputLabel
displays a label.
h:outputLink
displays a hypertext link.
displays a combo box for selecting one item.
h:selectOneMenu
h:selectOneRadio
displays a set of radio button.
h:selectManyCheckbox
displays checkboxes.
h:selectOneListbox
displays a list for selecting one item.
displays a list for selecting multiple items.
h:selectManyListbox
f:selectItem
specifies an item in an h:selectOneMenu,
h:selectOneRadio, or h:selectManyListbox.
h:message
displays a message for validating input.
h:dataTable
displays a data table.
specifies a column in a data table.
h:column
h:graphicImage
displays an image.
Listing 33.4 is an example that uses some of these elements to display a student registration
form, as shown in Figure 33.11.
 
 
 
Search WWH ::




Custom Search