This commit is contained in:
2023-09-27 13:31:02 -05:00
parent 99634aba7e
commit a7c5929537
307 changed files with 23548 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all">
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<!--
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>

View File

@@ -0,0 +1,128 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Validating Data</title>
</h:head>
<h:body>
<h:form id="employeeForm">
<h:panelGrid id="outer" columns="2">
<h:column style="vertical-align: top;">
<h1>Java Developer Employee Information</h1>
<br/>
<h:messages globalOnly="true" errorStyle="color: red"
infoStyle="color: green"/>
<br/>
<h:dataTable id="empTable"
var="emp"
border="1"
value="#{employeeController.company.getEmployees()}"
rendered="#{employeeController.company.getEmployees().size() > 0}">
<f:facet name="header">
Current Employees
</f:facet>
<h:column id="empNameCol">
<f:facet name="header">Employee</f:facet>
<h:outputText id="empName"
value="#{emp.getEmployeeFirst()} #{emp.employeeLast}"/>
</h:column>
<h:column id="titleCol">
<f:facet name="header">Title</f:facet>
<h:outputText id="title" value="#{emp.employeeTitle}"/>
</h:column>
<h:column id="imageCol">
<f:facet name="header">Photo</f:facet>
<h:graphicImage library="images" name="#{emp.photo}"/>
</h:column>
</h:dataTable>
<p> Please use the form below to insert employee information. </p>
<h:panelGrid columns="3">
<h:outputLabel for="employeeFirst" value="First:" />
<h:inputText id="employeeFirst"
value="#{employeeController.employeeFirst}">
<f:validateLength minimum="3" maximum="30"/>
</h:inputText>
<h:message for="employeeFirst" errorStyle="color:red"/>
<h:outputLabel for="employeeLast" value="Last: " />
<h:inputText id="employeeLast" value="#{employeeController.employeeLast}">
<f:validateLength minimum="3" maximum="30"/>
</h:inputText>
<h:message for="employeeLast" errorStyle="color:red"/>
<h:outputLabel for="employeeTitle" value="Title (Must be a Java Position): " />
<h:inputText id="employeeTitle" value="#{employeeController.employeeTitle}">
<f:validator validatorId="employeeTitleValidate" />
</h:inputText>
<h:message for="employeeTitle" errorStyle="color:red"/>
</h:panelGrid>
<h:commandButton id="employeeInsert"
action="#{employeeController.insert}"
value="Insert Employee"/>
</h:column>
<h:column style="vertical-align: top;">
<h1>Delete Information</h1>
<br/>
<h:messages globalOnly="true" errorStyle="color: red"
infoStyle="color: green"/>
<br/>
<h:dataTable id="DeleteTable"
var="emp"
border="1"
value=""
rendered="">
<f:facet name="header">
Deleted Employees
</f:facet>
<h:column id="empDeletedName">
<f:facet name="header">Name</f:facet>
<h:outputText id="empNameDelete"
value=""/>
</h:column>
</h:dataTable>
<p> Please use the form below to insert employee information. </p>
<h:panelGrid columns="3">
<h:outputLabel for="employeeLastToDelete" value="Last: " />
<h:inputText id="employeeLastToDelete" value="#{employeeController.employeeLast}">
<f:validateLength minimum="3" maximum="30"/>
</h:inputText>
<h:message for="employeeLastToDelete" errorStyle="color:red"/>
</h:panelGrid>
</h:column>
</h:panelGrid>
<h:commandButton id="delete"
action="#{employeeController.delete}"
value="Delete Employee"/>
</h:form>
</h:body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB