-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateEmployee.xhtml
More file actions
38 lines (37 loc) · 1.58 KB
/
createEmployee.xhtml
File metadata and controls
38 lines (37 loc) · 1.58 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
<?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">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Invoke Stored Procedure</title>
</h:head>
<h:body>
<h:form>
<p>
This form utilizes an underlying database stored procedure to insert
data into the EMPLOYEE table.
</p>
<h:messages id="messages" errorStyle="color: red" infoStyle="color:green" globalOnly="true"/>
<label>First: </label>
<h:inputText id="firstName" value="#{employeeBean.employee.first}"/>
<br/>
<label>Last: </label>
<h:inputText id="lastName" value="#{employeeBean.employee.last}"/>
<br/>
<label>Status </label>
<h:selectOneMenu id="status" value="#{employeeBean.employee.status}">
<f:selectItem itemLabel="ACTIVE" itemValue="ACTIVE"/>
<f:selectItem itemLabel="INACTIVE" itemValue="INACTIVE"/>
</h:selectOneMenu>
<h:commandButton value="Create Employee" action="#{employeeBean.createEmployee()}">
<f:ajax execute="@form" render="messages"/>
</h:commandButton>
</h:form>
</h:body>
</html>