Insert.jsp – HP Integrity NonStop J-Series User Manual

Page 433

Advertising
background image

<f:facet name="header">
<h:outputText value="Welcome To Employee Management Service "
styleClass="style1" />
</f:facet>
</h:column>
</h:dataTable>

<br>
</br>
<t:commandLink id="Link1" action="#{EmpBean.resetInsert}"
immediate="true">
<h:outputText value="Insert New Employee details >>" />
</t:commandLink>
<br>
</br>

<t:commandLink id="Link2" action="#{EmpBean.resetUpdate}" immediate="true">
<h:outputText value="Update the existing employee details >>" />
</t:commandLink>

</h:panelGroup>
</t:htmlTag>

</h:panelGrid>

</h:form></center>
</body>
</html>
</f:view>

insert.jsp

This page enables you to insert a new employee detail in the database. It contains the EmployeeID,
firstname, lastname, age, and email fields.

You should provide the required values in each of the fields. If you enter incorrect values in any
of the fields, the respective error message appears on the page.

Replace the contents of the existing insert.jsp file with the code given below:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<f:loadBundle basename="com.hp.empinfo.web.message" var="message" />
<f:view>

<html>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<head>
<title>Record Insertion</title>
<link href="mycss.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h:form id="InsertForm">

<h:panelGrid width="100%" columns="1" border="0"
style="padding-left:10px; padding-top:10px; " styleClass="top_bg">
<h:dataTable id="dt1" border="0" cellpadding="0" cellspacing="0"
var="ab">
<h:column>
<f:facet name="header">
<h:outputText value="SpringFaces" styleClass="style4" />
</f:facet>
</h:column>
</h:dataTable>
</h:panelGrid>

Example of Integrating MyFaces into Spring 433

Advertising
This manual is related to the following products: