Markou's stupid assignments are a pain in the ass
This commit is contained in:
Binary file not shown.
@@ -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_3_0.xsd"
|
||||
bean-discovery-mode="all">
|
||||
</beans>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="3.0" xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
|
||||
<!-- Define Persistence Unit -->
|
||||
<persistence-unit name="my_persistence_unit">
|
||||
|
||||
</persistence-unit>
|
||||
</persistence>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="5.0" 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_5_0.xsd">
|
||||
<context-param>
|
||||
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
|
||||
<param-value>Development</param-value>
|
||||
</context-param>
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<session-config>
|
||||
<session-timeout>
|
||||
30
|
||||
</session-timeout>
|
||||
</session-config>
|
||||
<welcome-file-list>
|
||||
<welcome-file>faces/supplier.xhtml</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
@@ -0,0 +1,51 @@
|
||||
<?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">
|
||||
<h:head>
|
||||
<h:outputStylesheet library="css" name="styles.css"/>
|
||||
<title>Supplier Parts DB</title>
|
||||
</h:head>
|
||||
<h:body>
|
||||
|
||||
<h:form>
|
||||
<h1> Suppliers-Parts Database </h1>
|
||||
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel styleClass="label" value="Supplier ID:"/>
|
||||
<h:inputText value="#{suppliers.snumber}"/>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid columns="8">
|
||||
<h:outputLabel styleClass="label" value="Supplier Name"/>
|
||||
<h:inputText
|
||||
value="#{suppliers.sname}"/>
|
||||
<h:outputLabel styleClass="label" value="Status" />
|
||||
<h:inputText
|
||||
value="#{suppliers.status}"/>
|
||||
<h:outputLabel styleClass="label" value="Birthday" />
|
||||
<h:inputText value="#{suppliers.birthday}"/>
|
||||
|
||||
<h:outputLabel styleClass="label" value="City" />
|
||||
<h:inputText
|
||||
value="#{suppliers.city}"/>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid columns="6">
|
||||
<h:commandButton styleClass="button" value="View Supplier" action="#{suppliers.viewSupplier()}"/>
|
||||
<h:commandButton value="Insert Supplier" action="#{suppliers.insertSupplier}"/>
|
||||
<h:commandButton value="Update Supplier" action="#{suppliers.updateSupplier}"/>
|
||||
<h:commandButton value="Delete Supplier" action="#{suppliers.deleteSupplier}"/>
|
||||
<h:commandButton value="List All Suppliers" action="#{suppliers.listAll}"/>
|
||||
<h:commandButton value="Clear" action="#{suppliers.clear}"/>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid>
|
||||
<h:outputText escape="false" style="color:green"
|
||||
value="#{suppliers.result}">
|
||||
</h:outputText>
|
||||
</h:panelGrid>
|
||||
|
||||
</h:form>
|
||||
</h:body>
|
||||
</html>
|
@@ -0,0 +1,71 @@
|
||||
.body {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin: 10px;
|
||||
border-left: thin solid darkGray;
|
||||
border-bottom: thin solid darkGray;
|
||||
border-top: thin solid lightGray;
|
||||
border-right: thin solid lightGray;
|
||||
color: #777;
|
||||
background: #A7C942;
|
||||
font-family: "Comic Sans MS";
|
||||
border-radius: 20%;
|
||||
}
|
||||
h1
|
||||
{
|
||||
vertical-align: top;
|
||||
text-align: middle;
|
||||
font-style: italic;
|
||||
color: #888;
|
||||
font-size: 2em;
|
||||
font-family: "Comic Sans MS";
|
||||
|
||||
}
|
||||
|
||||
.label
|
||||
{
|
||||
color: #888;
|
||||
font-size: 0.8em;
|
||||
font-family: "Comic Sans MS";
|
||||
}
|
||||
.leftImage {
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.backLink {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
.tableHeader {
|
||||
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
border-collapse:collapse;
|
||||
font-size:1.1em;
|
||||
text-align:left;
|
||||
padding-top:5px;
|
||||
padding-bottom:4px;
|
||||
background-color:#A7C942;
|
||||
color:white;
|
||||
border:1px solid #98bf21;
|
||||
}
|
||||
|
||||
.oddTableRow {
|
||||
border:1px solid #98bf21;
|
||||
}
|
||||
|
||||
.evenTableRow {
|
||||
background-color: #eeeeee;
|
||||
font-size:1em;
|
||||
|
||||
padding:3px 7px 2px 7px;
|
||||
|
||||
color:#000000;
|
||||
background-color:#EAF2D3;
|
||||
}
|
||||
|
||||
.table {
|
||||
border:1px solid green;
|
||||
}
|
@@ -0,0 +1,101 @@
|
||||
<?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"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
<h:head>
|
||||
<title>Suppliers Table</title>
|
||||
</h:head>
|
||||
<h:body>
|
||||
<h:form>
|
||||
<p:growl id="globalgrowl" showDetail="false" showSummary="true" life="2000"/>
|
||||
|
||||
<p:dataTable id="id_supplier_table"
|
||||
var="supplier"
|
||||
value="#{supplierBean.getSuppliers()}"
|
||||
scrollable="true"
|
||||
paginatorAlwaysVisible="true"
|
||||
paginator="true"
|
||||
paginatorPosition="top"
|
||||
rows="10"
|
||||
lazy="true"
|
||||
>
|
||||
<f:facet name="header"> <h:outputText value="Suppliers Table" style="font-size: 1.2em"/></f:facet>
|
||||
<f:event type="preRenderView"
|
||||
listener="#{supplierBean.displayExceptionMessageAtPreRenderListener}"
|
||||
/>
|
||||
|
||||
<p:column>
|
||||
<f:facet name="header"> <h:outputText value="update" /></f:facet>
|
||||
<h:selectBooleanCheckbox onclick="submit()"
|
||||
value="#{supplier.modify}">
|
||||
</h:selectBooleanCheckbox >
|
||||
</p:column>
|
||||
<p:column id="idColumnSnumber">
|
||||
<f:facet name="header"> <h:outputText value="snumber" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.insertFromDatatable and !supplier.modify}" value="#{supplier.snumber}">
|
||||
|
||||
</h:inputText>
|
||||
</p:column>
|
||||
|
||||
<p:column>
|
||||
<f:facet name="header"> <h:outputText value="sname" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.sname}"/>
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header"> <h:outputText value="birthday" /></f:facet>
|
||||
|
||||
<p:calendar
|
||||
disabled ="#{!supplier.modify}"
|
||||
value="#{supplier.birthday_date}"
|
||||
pattern="yyyy/MM/dd"/>
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header"> <h:outputText value="status" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.status}"/>
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header"> <h:outputText value="city" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.city}"/>
|
||||
</p:column>
|
||||
|
||||
|
||||
|
||||
</p:dataTable>
|
||||
<p:draggable for="id_supplier_table"/>
|
||||
|
||||
<p:commandButton value="Save" action="#{supplierBean.saveFromUpdate()}" />
|
||||
<p:commandButton id="idInsertRow" value="Insert Row" action="#{supplierBean.insertSupplier()}" />
|
||||
<p:commandButton title="Delete Supplier"
|
||||
value="X" styleClass="ui-button-raised ui-button-danger"
|
||||
icon="pi pi-trash"
|
||||
onclick="PF('asdv-dlg-delete').show();"
|
||||
>
|
||||
|
||||
</p:commandButton >
|
||||
<p:dialog id="dlg" header="Delete a Supplier"
|
||||
widgetVar="asdv-dlg-delete" modal="true">
|
||||
<h:outputText value="Are you sure you want to delete this supplier?"/>
|
||||
<br/>
|
||||
<br/>
|
||||
<p:commandButton value="OK" icon="pi pi-check"
|
||||
update="@form:globalgrowl"
|
||||
onclick="PF('dlg').hide();"
|
||||
action="#{supplierBean.deleteSupplier()}">
|
||||
</p:commandButton >
|
||||
<span> </span>
|
||||
<p:commandButton value="Cancel"
|
||||
styleClass="ui-button-raised ui-button-warning"
|
||||
update="@none"
|
||||
partialSubmit = "true"
|
||||
onclick="PF('dlg').hide();"/>
|
||||
</p:dialog>
|
||||
|
||||
</h:form>
|
||||
</h:body>
|
||||
</html>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="3.0" xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
|
||||
<!-- Define Persistence Unit -->
|
||||
<persistence-unit name="my_persistence_unit">
|
||||
|
||||
</persistence-unit>
|
||||
</persistence>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Sun Nov 19 23:24:30 CST 2023
|
||||
groupId=com.mycompany
|
||||
artifactId=Suppliers_Parts_Calendar_Primefaces
|
||||
version=1.0-SNAPSHOT
|
@@ -0,0 +1,9 @@
|
||||
edu/slcc/asdv/bl/DBase.class
|
||||
edu/slcc/asdv/bl/UtilitiesDatabase.class
|
||||
com/mycompany/supplierspartsdatabase/JakartaRestConfiguration.class
|
||||
edu/slcc/asdv/bl/supplier/DatabaseManipulationSupplier.class
|
||||
edu/slcc/asdv/bl/supplier/Supplier.class
|
||||
edu/slcc/asdv/bl/part/DatabaseManipulationPart.class
|
||||
edu/slcc/asdv/beans/SupplierBean.class
|
||||
edu/slcc/asdv/bl/part/Part.class
|
||||
com/mycompany/supplierspartsdatabase/resources/JakartaEE9Resource.class
|
@@ -0,0 +1,9 @@
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/part/Part.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/part/DatabaseManipulationPart.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/com/mycompany/supplierspartsdatabase/JakartaRestConfiguration.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/DBase.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/supplier/DatabaseManipulationSupplier.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/com/mycompany/supplierspartsdatabase/resources/JakartaEE9Resource.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/beans/SupplierBean.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/UtilitiesDatabase.java
|
||||
/home/caleb/ASDV-WebDev/Semester 2/Assignments/Tennis_Database_Primefaces_CalebFontenot/src/main/java/edu/slcc/asdv/bl/supplier/Supplier.java
|
Reference in New Issue
Block a user