diff --git a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/beans/EmployeeController.java b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/beans/EmployeeController.java index 010c402..9bbcfca 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/beans/EmployeeController.java +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/beans/EmployeeController.java @@ -24,6 +24,16 @@ public class EmployeeController implements Serializable { private String employeeFirst; private String employeeLast; private String employeeTitle; + private String employeeLastToDelete; + + public String getEmployeeLastToDelete() { + return employeeLastToDelete; + } + + public void setEmployeeLastToDelete(String employeeLastToDelete) { + this.employeeLastToDelete = employeeLastToDelete; + } + private boolean validateInsertion; @@ -124,7 +134,8 @@ public class EmployeeController implements Serializable { FacesMessage facesMsg = null; if (b) { facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, - "Employee Successfully Added", null); + "Successfully Added Employee: " + this.employeeFirst + " " + this.employeeLast, null); + System.out.println("Successfully Added Employee: " + this.employeeFirst + " " + this.employeeLast); this.employeeFirst = ""; this.employeeLast = ""; this.employeeTitle = ""; @@ -139,12 +150,13 @@ public class EmployeeController implements Serializable { boolean de = false; FacesMessage facesMsg = null; for (int i = 0; i < company.getEmployees().size(); ++i) { - if (company.getEmployees().get(i).getEmployeeLast().toLowerCase().equals(this.getEmployeeLast().toLowerCase())) { + if (company.getEmployees().get(i).getEmployeeLast().toLowerCase().equals(this.getEmployeeLastToDelete().toLowerCase())) { Employee employeeToDelete = company.getEmployees().get(i); company.getDeletedEmployees().add(employeeToDelete); company.removeEmployee(employeeToDelete); facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, - "Employee Successfully Deleted", null); + "Successfully Deleted Employee: " + company.getEmployees().get(i), null); + System.out.println("Successfully Deleted Employee: " + company.getEmployees().get(i)); } } } 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 9f46d68..4bd9424 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Company.java @@ -42,6 +42,8 @@ public Company() { @Override public List getEmployees(){return employeeList;} + + @Override public List getDeletedEmployees(){return deletedEmployeeList;} } diff --git a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Employee.java b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Employee.java index 53d554c..19e6920 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Employee.java +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/java/bl/Employee.java @@ -15,6 +15,7 @@ public class Employee { private String employeeTitle; private String photo; + public Employee(String employeeFirst, String employeeLast, String employeeTitle, String photo) { this.employeeFirst = employeeFirst; @@ -107,4 +108,9 @@ public class Employee { this.employeeFirst = employeeFirst; } + @Override + public String toString() { + return "Employee{" + "employeeFirst=" + employeeFirst + ", employeeLast=" + employeeLast + ", employeeTitle=" + employeeTitle + ", photo=" + photo + '}'; + } + } diff --git a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/index.xhtml b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/index.xhtml index 6d9eddd..b5804a9 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/index.xhtml +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/index.xhtml @@ -11,7 +11,7 @@ - +

Java Developer Employee Information


Photo - +
@@ -49,14 +49,14 @@ - + value="#{employeeController.employeeFirst}" > + - - + + @@ -93,9 +93,19 @@ - Name + Employee + value="#{emp.getEmployeeFirst()} #{emp.employeeLast}"/> + + + + Title + + + + + Photo + @@ -104,8 +114,8 @@ - - + + @@ -115,13 +125,13 @@ - +
- +
diff --git a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/resources/css/1.css b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/resources/css/1.css index d9ac305..bc8f020 100644 --- a/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/resources/css/1.css +++ b/Semester 2/LabJuneauValidateUserInput_CalebFontenot/src/main/webapp/resources/css/1.css @@ -13,4 +13,9 @@ td { padding-bottom: 20px; padding-left: 30px; padding-right: 40px; +} + +.image { + width: 50px; + height: auto; } \ No newline at end of file diff --git a/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip b/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip new file mode 100644 index 0000000..d38eb18 Binary files /dev/null and b/Semester 2/ZIPs/LabJuneauValidateUserInput_CalebFontenot.zip differ