diff --git a/.gitignore b/.gitignore index 370e082..1023db7 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /Semester 2/LabJuneauValidateUserInput_CalebFontenot/target/ /Semester 2/Assignments/lab_EL5_CalebFontenot/target/ /Semester 2/Assignments/labEL2_CalebFontenot/target/ +/Semester 2/LabJuneauValidateUserInput/target/ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Company.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Company.html new file mode 100644 index 0000000..2b59e3a --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Company.html @@ -0,0 +1,48 @@ + + + +Company.java + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Company.java
+
+package edu.slcc.asdv.bl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author ASDV1
+ */
+public class Company implements EmployeeInterface
+{
+    private List<Employee> employeeList;
+    public Company(){employeeList = new ArrayList<Employee>();  }
+    @Override
+    public boolean insertEmployee(Employee e){return employeeList.add( e ); }
+
+    @Override
+    public boolean removeEmployee(Employee e){return employeeList.remove(e);}
+
+    @Override
+    public List<Employee> getEmployees(){return employeeList;}
+
+}
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Employee.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Employee.html new file mode 100644 index 0000000..04ce7c4 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/Employee.html @@ -0,0 +1,64 @@ + + + +Employee.java + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Employee.java
+
+package edu.slcc.asdv.bl;
+
+import java.io.Serializable;
+
+public class Employee implements Serializable
+{
+
+    private String employeeFirst;
+    private String employeeLast;
+    private String employeeTitle;
+    private String photo;
+
+
+
+    public Employee(String first, 
+            String last, String title, 
+            String photo)
+    {
+        employeeFirst = first;
+        employeeLast = last;
+        employeeTitle = title;
+        this.photo = photo;
+    }
+
+    public String getEmployeeFirst() { return employeeFirst; }
+
+    public void setEmployeeFirst(String employeeFirst){ this.employeeFirst = employeeFirst;}
+
+    public String getEmployeeLast(){return employeeLast;}
+
+    public void setEmployeeLast(String employeeLast){this.employeeLast = employeeLast;}
+
+    public String getEmployeeTitle(){return employeeTitle; }
+
+    public void setEmployeeTitle(String employeeTitle){ this.employeeTitle = employeeTitle; }
+
+    public String getPhoto(){return photo;}
+
+    public void setPhoto(String photo){this.photo = photo;}
+
+}
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeController.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeController.html new file mode 100644 index 0000000..b5f582b --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeController.html @@ -0,0 +1,88 @@ + + + +EmployeeController.java + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/beans/EmployeeController.java
+
+package edu.slcc.asdv.beans;
+
+import edu.slcc.asdv.bl.Company;
+import edu.slcc.asdv.bl.Employee;
+import edu.slcc.asdv.bl.EmployeeInterface;
+import jakarta.enterprise.context.SessionScoped;
+import jakarta.faces.application.FacesMessage;
+import jakarta.faces.context.FacesContext;
+import jakarta.inject.Named;
+import java.io.Serializable;
+
+
+@Named(value = "employeeController")
+@SessionScoped
+public class EmployeeController implements Serializable
+{
+
+    private String employeeFirst;
+    private String employeeLast;
+    private String employeeTitle;
+
+    private EmployeeInterface company;//placeholder
+    
+    public EmployeeController() { company = new Company(); }
+    
+    public EmployeeInterface getCompany(){ return this.company ;}
+    
+    public String getEmployeeFirst(){return employeeFirst;}
+    public void setEmployeeFirst(String employeeFirst){ this.employeeFirst = employeeFirst; }
+    public String getEmployeeLast(){return employeeLast;}
+    public void setEmployeeLast(String employeeLast){ this.employeeLast = employeeLast; }
+    public String getEmployeeTitle(){return employeeTitle;}
+    public void setEmployeeTitle(String employeeTitle){ this.employeeTitle = employeeTitle;}
+    
+    public void delete(Employee e) {
+            System.out.println(e);
+            company.removeEmployee(e);
+    };
+    
+    public void insert()
+    {
+        boolean b = company.insertEmployee(
+                new Employee(
+                        this.employeeFirst, //from textbox
+                        this.getEmployeeLast(), //from textbox
+                        this.employeeTitle, "1.png"));
+        FacesMessage facesMsg = null;
+        if (b)
+        {
+            facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO,
+                    "Employee Successfully Added", null);
+            this.employeeFirst = "";//reset text boxes too
+            this.employeeLast = "";
+            this.employeeTitle = "";
+        }
+        else
+            facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+                    "Employee Not Added", null);   
+        FacesContext.getCurrentInstance().addMessage(null, facesMsg);
+    }
+}
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeInterface.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeInterface.html new file mode 100644 index 0000000..080fefd --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeInterface.html @@ -0,0 +1,58 @@ + + + +EmployeeInterface.java + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/EmployeeInterface.java
+
+
+package edu.slcc.asdv.bl;
+
+import java.util.List;
+
+/**
+ *
+ * @author ASDV1
+ */
+public interface EmployeeInterface
+{
+/**Inserts a new employee in thr list
+ * 
+ * @param e the employee to be inserted.
+ * @return true if inserted successfully, false otherwise.
+ */
+    boolean insertEmployee(Employee e);
+    
+    /** Removes an employee from the list.
+     * 
+     * @param e the employee to be removed
+     * @return true if the employee was successfully removed, false otherwise.
+     */
+    boolean removeEmployee(Employee e);
+    
+    /** Gets all employees in the list.
+     * 
+     * @return list of employees.
+     */
+    List<Employee> getEmployees();
+    
+}
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeTitleValidate.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeTitleValidate.html new file mode 100644 index 0000000..9d17eac --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/EmployeeTitleValidate.html @@ -0,0 +1,58 @@ + + + +EmployeeTitleValidate.java + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/validators/EmployeeTitleValidate.java
+
+package edu.slcc.asdv.validators;
+
+import jakarta.faces.application.FacesMessage;
+import jakarta.faces.component.UIComponent;
+import jakarta.faces.context.FacesContext;
+import jakarta.faces.validator.FacesValidator;
+import jakarta.faces.validator.Validator;
+import jakarta.faces.validator.ValidatorException;
+
+@FacesValidator("employeeTitleValidate")
+public class EmployeeTitleValidate implements Validator
+{
+
+    @Override
+    public void validate(FacesContext fc, UIComponent uic, Object t) 
+            throws ValidatorException
+    {
+        checkTitle(t);
+    }
+
+    private void checkTitle(Object value)
+    {
+        String title = value.toString();
+        title = title.toLowerCase();
+        if (!title.contains("java"))
+        {
+            String messageText = "Title does not include the word Java";
+            String messageTextLong = "Title does not include the word Java. "
+                                         + "Please type java";
+            throw new ValidatorException(
+                    new FacesMessage(FacesMessage.SEVERITY_ERROR,
+                    messageText, messageTextLong));
+        }
+    }
+
+}
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/index.html b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/index.html new file mode 100644 index 0000000..72a8d06 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/Printed HTMLs/index.html @@ -0,0 +1,122 @@ + + + +index.xhtml + + + + +
/home/caleb/ASDV-WebDev/Semester 2/LabJuneauValidateUserInput/src/main/webapp/index.xhtml
+
+<?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:outputStylesheet name="css/1.css"/>
+
+    </h:head>
+    <h:body>
+        <h:form id="employeeForm">
+            <h:panelGrid id="outer" columns="2"
+                          >
+                <h:column  >
+                    <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:column>
+                        <f:facet name="header">Delete</f:facet>
+                        <h:commandLink value="delete" immediate="true"
+                                                       action="#{employeeController.delete(emp)}"/>
+                        </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 disabled=""
+                                
+                                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:panelGrid>
+               </h:form>
+    </h:body>
+</html>
+
+
+
+ diff --git a/Semester 2/LabJuneauValidateUserInput/nb-configuration.xml b/Semester 2/LabJuneauValidateUserInput/nb-configuration.xml new file mode 100644 index 0000000..2b8fafd --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + JSP + JDK_11__System_ + + diff --git a/Semester 2/LabJuneauValidateUserInput/pom.xml b/Semester 2/LabJuneauValidateUserInput/pom.xml new file mode 100644 index 0000000..fae3e12 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + com.pap.exam + LabJuneauValidateUserInput + 1.0 + war + LabJuneauValidateUserInput-1.0 + + + 1.8 + 1.8 + ${project.build.directory}/endorsed + UTF-8 + false + 9.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/JakartaRestConfiguration.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/JakartaRestConfiguration.java new file mode 100644 index 0000000..42172b2 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package com.pap.exam.labjuneauvalidateuserinput; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/resources/JakartaEE9Resource.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/resources/JakartaEE9Resource.java new file mode 100644 index 0000000..1f52157 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/com/pap/exam/labjuneauvalidateuserinput/resources/JakartaEE9Resource.java @@ -0,0 +1,20 @@ +package com.pap.exam.labjuneauvalidateuserinput.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee9") +public class JakartaEE9Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/beans/EmployeeController.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/beans/EmployeeController.java new file mode 100644 index 0000000..56ba15f --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/beans/EmployeeController.java @@ -0,0 +1,61 @@ +package edu.slcc.asdv.beans; + +import edu.slcc.asdv.bl.Company; +import edu.slcc.asdv.bl.Employee; +import edu.slcc.asdv.bl.EmployeeInterface; +import jakarta.enterprise.context.SessionScoped; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.context.FacesContext; +import jakarta.inject.Named; +import java.io.Serializable; + + +@Named(value = "employeeController") +@SessionScoped +public class EmployeeController implements Serializable +{ + + private String employeeFirst; + private String employeeLast; + private String employeeTitle; + + private EmployeeInterface company;//placeholder + + public EmployeeController() { company = new Company(); } + + public EmployeeInterface getCompany(){ return this.company ;} + + public String getEmployeeFirst(){return employeeFirst;} + public void setEmployeeFirst(String employeeFirst){ this.employeeFirst = employeeFirst; } + public String getEmployeeLast(){return employeeLast;} + public void setEmployeeLast(String employeeLast){ this.employeeLast = employeeLast; } + public String getEmployeeTitle(){return employeeTitle;} + public void setEmployeeTitle(String employeeTitle){ this.employeeTitle = employeeTitle;} + + public void delete(Employee e) { + System.out.println(e); + company.removeEmployee(e); + }; + + public void insert() + { + boolean b = company.insertEmployee( + new Employee( + this.employeeFirst, //from textbox + this.getEmployeeLast(), //from textbox + this.employeeTitle, "1.png")); + FacesMessage facesMsg = null; + if (b) + { + facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, + "Employee Successfully Added", null); + this.employeeFirst = "";//reset text boxes too + this.employeeLast = ""; + this.employeeTitle = ""; + } + else + facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, + "Employee Not Added", null); + FacesContext.getCurrentInstance().addMessage(null, facesMsg); + } +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Company.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Company.java new file mode 100644 index 0000000..5daef02 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Company.java @@ -0,0 +1,23 @@ +package edu.slcc.asdv.bl; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author ASDV1 + */ +public class Company implements EmployeeInterface +{ + private List employeeList; + public Company(){employeeList = new ArrayList(); } + @Override + public boolean insertEmployee(Employee e){return employeeList.add( e ); } + + @Override + public boolean removeEmployee(Employee e){return employeeList.remove(e);} + + @Override + public List getEmployees(){return employeeList;} + +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Employee.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Employee.java new file mode 100644 index 0000000..4462653 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/Employee.java @@ -0,0 +1,41 @@ +package edu.slcc.asdv.bl; + +import java.io.Serializable; + +public class Employee implements Serializable +{ + + private String employeeFirst; + private String employeeLast; + private String employeeTitle; + private String photo; + + + + public Employee(String first, + String last, String title, + String photo) + { + employeeFirst = first; + employeeLast = last; + employeeTitle = title; + this.photo = photo; + } + + public String getEmployeeFirst() { return employeeFirst; } + + public void setEmployeeFirst(String employeeFirst){ this.employeeFirst = employeeFirst;} + + public String getEmployeeLast(){return employeeLast;} + + public void setEmployeeLast(String employeeLast){this.employeeLast = employeeLast;} + + public String getEmployeeTitle(){return employeeTitle; } + + public void setEmployeeTitle(String employeeTitle){ this.employeeTitle = employeeTitle; } + + public String getPhoto(){return photo;} + + public void setPhoto(String photo){this.photo = photo;} + +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/EmployeeInterface.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/EmployeeInterface.java new file mode 100644 index 0000000..99815fe --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/bl/EmployeeInterface.java @@ -0,0 +1,32 @@ + +package edu.slcc.asdv.bl; + +import java.util.List; + +/** + * + * @author ASDV1 + */ +public interface EmployeeInterface +{ +/**Inserts a new employee in thr list + * + * @param e the employee to be inserted. + * @return true if inserted successfully, false otherwise. + */ + boolean insertEmployee(Employee e); + + /** Removes an employee from the list. + * + * @param e the employee to be removed + * @return true if the employee was successfully removed, false otherwise. + */ + boolean removeEmployee(Employee e); + + /** Gets all employees in the list. + * + * @return list of employees. + */ + List getEmployees(); + +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/validators/EmployeeTitleValidate.java b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/validators/EmployeeTitleValidate.java new file mode 100644 index 0000000..48e42a0 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/java/edu/slcc/asdv/validators/EmployeeTitleValidate.java @@ -0,0 +1,36 @@ +package edu.slcc.asdv.validators; + +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.FacesValidator; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; + +@FacesValidator("employeeTitleValidate") +public class EmployeeTitleValidate implements Validator +{ + + @Override + public void validate(FacesContext fc, UIComponent uic, Object t) + throws ValidatorException + { + checkTitle(t); + } + + private void checkTitle(Object value) + { + String title = value.toString(); + title = title.toLowerCase(); + if (!title.contains("java")) + { + String messageText = "Title does not include the word Java"; + String messageTextLong = "Title does not include the word Java. " + + "Please type java"; + throw new ValidatorException( + new FacesMessage(FacesMessage.SEVERITY_ERROR, + messageText, messageTextLong)); + } + } + +} diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/resources/META-INF/persistence.xml b/Semester 2/LabJuneauValidateUserInput/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/beans.xml b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..a0cd39d --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..584a477 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/web.xml b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..0aa9448 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,31 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + + Faces Servlet + /faces/* + + + + + 30 + + + + + faces/index.xhtml + + diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/index.xhtml b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/index.xhtml new file mode 100644 index 0000000..5bb19cf --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/index.xhtml @@ -0,0 +1,92 @@ + + + + + + Validating Data + + + + + + + +

Java Developer Employee Information

+
+ +
+ + + + Current Employees + + + + Employee + + + + + Title + + + + + Photo + + + + Delete + + + +

Please use the form below to insert employee information.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/css/1.css b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/css/1.css new file mode 100644 index 0000000..aab40d9 --- /dev/null +++ b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/css/1.css @@ -0,0 +1,8 @@ + + + + +td { + + vertical-align: top; +} \ No newline at end of file diff --git a/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/images/1.png b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/images/1.png new file mode 100644 index 0000000..59a683a Binary files /dev/null and b/Semester 2/LabJuneauValidateUserInput/src/main/webapp/resources/images/1.png differ diff --git a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java index 4bd9424..2e8e3af 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java @@ -38,7 +38,12 @@ public Company() { public boolean insertEmployee(Employee e){return employeeList.add( e ); } @Override - public boolean removeEmployee(Employee e){return employeeList.remove(e); } + public boolean removeEmployee(Employee e){ + boolean b = employeeList.remove(e); + System.out.println(b); + return b; + + } @Override public List getEmployees(){return employeeList;} diff --git a/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip b/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip deleted file mode 100644 index d38eb18..0000000 Binary files a/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip and /dev/null differ