diff --git a/.gitignore b/.gitignore index 518ae06..804d61f 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /Semester 3/Assignments/Json1/target/ /Semester 3/Assignments/TermProject1_CalebFontenot copy/target/ /Semester 3/Assignments/TermProject2_CalebFontenot/target/ +/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/target/ diff --git a/Semester 3/Assignments/Lab_Templates2_CalebFontenot.zip b/Semester 3/Assignments/Lab_Templates2_CalebFontenot.zip new file mode 100644 index 0000000..e3b7bb3 Binary files /dev/null and b/Semester 3/Assignments/Lab_Templates2_CalebFontenot.zip differ diff --git a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/nb-configuration.xml b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/nb-configuration.xml index 5e1a2de..ea4eb8b 100644 --- a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/nb-configuration.xml +++ b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/nb-configuration.xml @@ -16,5 +16,6 @@ Any value defined here will override the pom.xml file value but is only applicab 10-web gfv700ee10 Facelets + ide diff --git a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/Lab_Templates2_CalebFontenot-1.0-SNAPSHOT.war b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/Lab_Templates2_CalebFontenot-1.0-SNAPSHOT.war index 187c1fb..bcc4cbc 100644 Binary files a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/Lab_Templates2_CalebFontenot-1.0-SNAPSHOT.war and b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/Lab_Templates2_CalebFontenot-1.0-SNAPSHOT.war differ diff --git a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index e562632..5cbd4f2 100644 --- a/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/Semester 3/Assignments/Lab_Templates2_CalebFontenot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -1,3 +1,3 @@ -/home/caleb/ASDV-Cpp/Assignments/Lab_Templates2_CalebFontenot/src/main/java/beans/Employee.java -/home/caleb/ASDV-Cpp/Assignments/Lab_Templates2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/lab_templates2_calebfontenot/JakartaRestConfiguration.java -/home/caleb/ASDV-Cpp/Assignments/Lab_Templates2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/lab_templates2_calebfontenot/resources/JakartaEE10Resource.java +/home/caleb/ASDV-WebDev/Semester 3/Assignments/Lab_Templates2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/lab_templates2_calebfontenot/resources/JakartaEE10Resource.java +/home/caleb/ASDV-WebDev/Semester 3/Assignments/Lab_Templates2_CalebFontenot/src/main/java/beans/Employee.java +/home/caleb/ASDV-WebDev/Semester 3/Assignments/Lab_Templates2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/lab_templates2_calebfontenot/JakartaRestConfiguration.java diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem1.html b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem1.html new file mode 100644 index 0000000..18a2152 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem1.html @@ -0,0 +1,57 @@ + + + +problem1.xhtml + + + + +
/home/caleb/ASDV-WebDev/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem1.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="jakarta.faces.html"
+      xmlns:p="http://primefaces.org/ui"
+      xmlns:f="jakarta.faces.core">
+    <h:head>
+        <title>Facelet Title</title>
+    </h:head>
+    <h:body>
+        <h:form id="myForm">
+        Prompt 1:
+       <h:inputText id="input1" value="#{problem1Bean.input1Text}">
+        <f:ajax event="keyup" listener="#{problem1Bean.prompt1EntryHandler}" render="input2"/>
+    </h:inputText>
+        <br/>
+        Prompt 2:
+       <h:inputText id="input2" value="#{problem1Bean.input2Text}">
+        <f:ajax event="keyup" listener="#{problem1Bean.prompt2EntryHandler}" render="input3" />
+    </h:inputText>
+        <br/>
+        Prompt 3:
+        <h:inputText id="input3" value="#{problem1Bean.input3Text}">
+            <f:ajax event="keyup" listener="#{problem1Bean.prompt3EntryHandler}" render="input1"/>
+        </h:inputText>
+        <br/>
+        </h:form>
+    </h:body>
+</html>
+
+
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem2.html b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem2.html new file mode 100644 index 0000000..b86b072 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem2.html @@ -0,0 +1,57 @@ + + + +problem2.xhtml + + + + +
/home/caleb/ASDV-WebDev/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem2.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="jakarta.faces.html"
+      xmlns:p="http://primefaces.org/ui">
+    <h:head>
+        <title>Facelet Title</title>
+    </h:head>
+    <h:body>
+        <h:form id="myForm">
+        Prompt 1:
+       <p:inputText id="input1" value="#{problem1Bean.input1Text}">
+        <p:ajax event="keyup" listener="#{problem1Bean.prompt1EntryHandler}" update="input2"/>
+    </p:inputText>
+        <br/>
+        Prompt 2:
+       <p:inputText id="input2" value="#{problem1Bean.input2Text}">
+        <p:ajax event="keyup" listener="#{problem1Bean.prompt2EntryHandler}" update="input3" />
+    </p:inputText>
+        <br/>
+        Prompt 3:
+        <p:inputText id="input3" value="#{problem1Bean.input3Text}">
+            <p:ajax event="keyup" listener="#{problem1Bean.prompt3EntryHandler}" update="input1"/>
+        </p:inputText>
+        <br/>
+        </h:form>
+    </h:body>
+</html>
+
+
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem3.html b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem3.html new file mode 100644 index 0000000..e8bfb8a --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/Printed HTMLs/problem3.html @@ -0,0 +1,51 @@ + + + +problem3.xhtml + + + + +
/home/caleb/ASDV-WebDev/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem3.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="jakarta.faces.html"
+      xmlns:f="jakarta.faces.core"
+      xmlns:p="http://primefaces.org/ui">
+    <h:head>
+        <title>Facelet Title</title>
+    </h:head>
+    <h:body>
+        <h:form id="MyForm">
+            <p:growl id="messages" showDetail="true" />
+            <h:selectOneMenu value="#{problem3Bean.selectedOption}">
+                <f:selectItem itemLabel="baseball" itemValue="baseball" />
+                <f:selectItem itemLabel="soccer" itemValue="soccer" />
+                <f:selectItem itemLabel="basketball" itemValue="basketball" />
+                <f:selectItem itemLabel="swimming" itemValue="swimming" />
+                <f:selectItem itemLabel="hiking" itemValue="hiking" />
+                <f:ajax listener="#{problem3Bean.handleSelection}" render="@form"/>
+            </h:selectOneMenu>
+        </h:form>
+    </h:body>
+</html>
+
+
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/nb-configuration.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..b98110a --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + ide + Facelets + + diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/pom.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/pom.xml new file mode 100644 index 0000000..94b0ae4 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/pom.xml @@ -0,0 +1,48 @@ + + 4.0.0 + edu.slcc.asdv.caleb + ProgrammingQuiz1_CalebFontenot + 1.0-SNAPSHOT + war + ProgrammingQuiz1_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + org.primefaces + primefaces + 13.0.5 + jakarta + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem1Bean.java b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem1Bean.java new file mode 100644 index 0000000..9249eae --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem1Bean.java @@ -0,0 +1,58 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package beans; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import java.io.Serializable; + +/** + * + * @author caleb + */ +@Named(value="problem1Bean") +@SessionScoped +public class Problem1Bean implements Serializable{ + + private String input1Text; + private String input2Text; + private String input3Text; + + public String getInput3Text() { return input3Text; } + + public void setInput3Text(String input3Text) { this.input3Text = input3Text; } + + public String getInput2Text() { return input2Text; } + + public void setInput2Text(String outputValue) { this.input2Text = outputValue; } + + public String getInput1Text() { return input1Text; } + + public void setInput1Text(String inputValue) { this.input1Text = inputValue; } + + + /** Creates a new instance of Problem1Bean */ + public Problem1Bean() { + } + public void prompt1EntryHandler() { + System.out.println("handler1 called"); + input2Text = input1Text; + System.out.println(input2Text); + } + + public void prompt2EntryHandler() { + System.out.println("handler2 called"); + input3Text = input2Text; + System.out.println(input3Text); + } + + public void prompt3EntryHandler() { + System.out.println("handler3 called"); + input1Text = input3Text; + System.out.println(input1Text); + } + +} diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem3Bean.java b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem3Bean.java new file mode 100644 index 0000000..5f356fa --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/beans/Problem3Bean.java @@ -0,0 +1,40 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package beans; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.context.FacesContext; +import java.io.Serializable; +import org.primefaces.PrimeFaces; + +/** + * + * @author caleb + */ +@Named(value="problem3Bean") +@SessionScoped +public class Problem3Bean implements Serializable{ + + private String selectedOption; + + public String getSelectedOption() { return selectedOption; } + public void setSelectedOption(String selectedOption) { this.selectedOption = selectedOption; } + + /** Creates a new instance of Problem3Bean */ + public Problem3Bean() { + } + + public void handleSelection() { + System.out.println("Selected option: " + selectedOption); + String messageContent = "sport = " + selectedOption; + FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Selected item:", messageContent); + FacesContext.getCurrentInstance().addMessage(null, message); + PrimeFaces.current().ajax().update("MyForm:messages"); + } + +} diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/JakartaRestConfiguration.java b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..5e5b9ad --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.programmingquiz1_calebfontenot; + +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 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/resources/JakartaEE10Resource.java b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..8f050ec --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/programmingquiz1_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.programmingquiz1_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/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 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/index.xhtml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/index.xhtml new file mode 100644 index 0000000..9f236d1 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/index.xhtml @@ -0,0 +1,13 @@ + + + + + Facelet Title + + +
+
+ +
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem1.xhtml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem1.xhtml new file mode 100644 index 0000000..11e30e6 --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem1.xhtml @@ -0,0 +1,29 @@ + + + + + Facelet Title + + + + Prompt 1: + + + +
+ Prompt 2: + + + +
+ Prompt 3: + + + +
+
+
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem2.xhtml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem2.xhtml new file mode 100644 index 0000000..5dc3a5e --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem2.xhtml @@ -0,0 +1,28 @@ + + + + + Facelet Title + + + + Prompt 1: + + + +
+ Prompt 2: + + + +
+ Prompt 3: + + + +
+
+
+ diff --git a/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem3.xhtml b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem3.xhtml new file mode 100644 index 0000000..f8a4fcc --- /dev/null +++ b/Semester 3/Exams-Quizzes/ProgrammingQuiz1_CalebFontenot/src/main/webapp/problem3.xhtml @@ -0,0 +1,23 @@ + + + + + Facelet Title + + + + + + + + + + + + + + + diff --git a/Semester 3/ZIPs/ProgrammingQuiz1_CalebFontenot.zip b/Semester 3/ZIPs/ProgrammingQuiz1_CalebFontenot.zip new file mode 100644 index 0000000..8a06f10 Binary files /dev/null and b/Semester 3/ZIPs/ProgrammingQuiz1_CalebFontenot.zip differ