-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidatingData_1.xhtml
More file actions
70 lines (58 loc) · 3.15 KB
/
validatingData_1.xhtml
File metadata and controls
70 lines (58 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Data Validation Example</title>
</h:head>
<h:body>
<ui:composition template="../layout/custom_template.xhtml">
<ui:define name="content">
<f:view>
<h:form prependId="false">
<h1>Create User</h1>
<br/>
<h:messages infoStyle="color: green;" errorStyle="color:red;"/>
<h:panelGrid columns="2" width="50%" cellspacing="5px;">
<h:outputLabel for="userid" value="User ID "/>
<h:panelGroup>
<h:inputText id="userid" value="#{usersBean.users.userId}"/>
<h:message for="userid" errorStyle="color: red;" infoStyle="color: green"/>
</h:panelGroup>
<h:outputLabel for="username" value="Username: "/>
<h:panelGroup>
<h:inputText id="username" value="#{usersBean.users.username}"/>
<h:message for="username" errorStyle="color: red;" infoStyle="color: green"/>
</h:panelGroup>
<h:outputLabel for="firstname" value="First: "/>
<h:panelGroup>
<h:inputText id="firstname" value="#{usersBean.users.firstname}"/>
<h:message for="firstname" errorStyle="color: red;" infoStyle="color: green"/>
</h:panelGroup>
<h:outputLabel for="lastname" value="Last: "/>
<h:panelGroup>
<h:inputText id="lastname" value="#{usersBean.users.lastname}"/>
<h:message for="lastname" errorStyle="color: red;" infoStyle="color: green"/>
</h:panelGroup>
<h:outputLabel for="password" value="Password: "/>
<h:panelGroup>
<h:inputSecret id="password" value="#{usersBean.users.password}"/>
<h:message for="password" errorStyle="color: red;" infoStyle="color: green"/>
</h:panelGroup>
</h:panelGrid>
<br/>
<h:commandButton action="#{usersBean.createUser()}"
value="Create User"/>
</h:form>
</f:view>
</ui:define>
</ui:composition>
</h:body>
</html>