Java Reference
In-Depth Information
F IGURE 33.11
A student registration form is displayed using JSF elements.
L ISTING 33.4
StudentRegistrationForm.xhtml
1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:h="http://xmlns.jcp.org/jsf/html"
6 xmlns:f="http://xmlns.jcp.org/jsf/core">
7 <h:head>
8 <title>Student Registration Form</title>
9 </h:head>
10 <h:body>
11 <h:form>
12 <!-- Use h:graphicImage -->
13 <h3>Student Registration Form
14 <h:graphicImage name="usIcon.gif" library="image"/>
15 </h3>
16
17 <!-- Use h:panelGrid -->
18 <h:panelGrid columns="6" style="color:green">
19 <h:outputLabel value="Last Name"/>
20 <h:inputText id="lastNameInputText" />
21 <h:outputLabel value="First Name" />
22 <h:inputText id="firstNameInputText" />
23 <h:outputLabel value="MI" />
24 <h:inputText id="miInputText" size="1" />
25 </h:panelGrid>
26
27 <!-- Use radio buttons -->
28 <h:panelGrid columns="2">
29 <h:outputLabel>Gender </h:outputLabel>
jsf core namespace
graphicImage
h:panelGrid
h:outputLabel
h:inputText
 
 
Search WWH ::




Custom Search