2024-05-07 11:47:54 -05:00

60 lines
7.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>page1.xhtml</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
table {color: #888888; background-color: #313335; font-family: monospace}
.ST3 {color: #e8bf6a}
.ST6 {color: #e8bf6a; font-family: monospace; font-weight: bold}
.ST7 {color: #6a8759}
.ST1 {color: #505050}
.ST4 {color: #bababa}
.ST2 {color: #287bde}
.ST0 {color: #628fb5}
.ST5 {color: #a5c261}
.expression-language {background-color: #232525}
.highlight-caret-row {background-color: #323232}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-WebDev/Semester 3/Exams-Quizzes/ProgrammingExam1_CalebFontenot/src/main/webapp/page1.xhtml</td></tr></table>
<pre>
<span class="highlight-caret-row">&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39; ?&gt;</span>
<span class="ST0">&lt;!DOCTYPE</span> <span class="ST0">html</span> <span class="ST0">PUBLIC</span> <span class="ST0">&quot;-//W3C//DTD</span> <span class="ST0">XHTML</span> <span class="ST0">1.0</span> <span class="ST0">Transitional//EN&quot;</span> <span class="ST0">&quot;</span><span class="ST2">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</span><span class="ST0">&quot;</span><span class="ST0">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">html</span> <span class="ST4">xmlns</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="ST2">http://www.w3.org/1999/xhtml</span><span class="ST5">&quot;</span>
<span class="ST4">xmlns:h</span><span class="ST4">=</span><span class="ST5">&quot;jakarta.faces.html&quot;</span>
<span class="ST4">xmlns:p</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="ST2">http://primefaces.org/ui</span><span class="ST5">&quot;</span><span class="ST3">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">h:head</span><span class="ST6">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">title</span><span class="ST3">&gt;</span>Facelet Title<span class="ST3">&lt;/</span><span class="ST3">title</span><span class="ST3">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">style</span><span class="ST3">&gt;</span>
<span class="ST7">body</span> {
text-align: center
}
<span class="ST3">&lt;/</span><span class="ST3">style</span><span class="ST3">&gt;</span>
<span class="ST6">&lt;/</span><span class="ST6">h:head</span><span class="ST6">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">h:body</span><span class="ST6">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">h:form</span><span class="ST6">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">h2</span> <span class="ST4">style</span><span class="ST4">=</span><span class="ST5">&quot;</span>display: inline;<span class="ST5">&quot;</span><span class="ST3">&gt;</span>Miles to kilometers label 1: <span class="ST3">&lt;/</span><span class="ST3">h2</span><span class="ST3">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">h:outputText</span> <span class="ST4">id</span><span class="ST4">=</span><span class="ST5">&quot;output1&quot;</span> <span class="ST4">style</span><span class="ST4">=</span><span class="ST5">&quot;</span>display: inline;<span class="ST5">&quot;</span> <span class="ST4">value</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="expression-language">#{</span><span class="expression-language">problem1Bean</span><span class="expression-language">.</span><span class="expression-language">output</span><span class="expression-language">}</span><span class="ST5">&quot;</span><span class="ST3">/</span><span class="ST6">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">br</span><span class="ST3">/&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">h2</span> <span class="ST4">style</span><span class="ST4">=</span><span class="ST5">&quot;</span>display: inline;<span class="ST5">&quot;</span><span class="ST3">&gt;</span>Miles to kilometers label 2: <span class="ST3">&lt;/</span><span class="ST3">h2</span><span class="ST3">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">h:outputText</span> <span class="ST4">id</span><span class="ST4">=</span><span class="ST5">&quot;output2&quot;</span> <span class="ST4">style</span><span class="ST4">=</span><span class="ST5">&quot;</span>display: inline;<span class="ST5">&quot;</span> <span class="ST4">value</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="expression-language">#{</span><span class="expression-language">problem1Bean</span><span class="expression-language">.</span><span class="expression-language">output</span><span class="expression-language">}</span><span class="ST5">&quot;</span><span class="ST3">/</span><span class="ST6">&gt;</span>
<span class="ST3">&lt;</span><span class="ST3">br</span><span class="ST3">/&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">p:inputText</span> <span class="ST4">value</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="expression-language">#{</span><span class="expression-language">problem1Bean</span><span class="expression-language">.</span><span class="expression-language">input</span><span class="expression-language">}</span><span class="ST5">&quot;</span> <span class="ST6">&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">p:ajax</span> <span class="ST4">event</span><span class="ST4">=</span><span class="ST5">&quot;keyup&quot;</span> <span class="ST4">listener</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="expression-language">#{</span><span class="expression-language">problem1Bean</span><span class="expression-language">.</span><span class="expression-language">convert</span><span class="expression-language">}</span><span class="ST5">&quot;</span> <span class="ST4">update</span><span class="ST4">=</span><span class="ST5">&quot;output2&quot;</span><span class="ST3">/</span><span class="ST6">&gt;</span>
<span class="ST6">&lt;/</span><span class="ST6">p:inputText</span><span class="ST6">&gt;</span>
mi<span class="ST3">&lt;</span><span class="ST3">br</span><span class="ST3">/&gt;</span>
<span class="ST6">&lt;</span><span class="ST6">p:commandButton</span> <span class="ST4">value</span><span class="ST4">=</span><span class="ST5">&quot;Convert Miles to Killometers&quot;</span> <span class="ST4">action</span><span class="ST4">=</span><span class="ST5">&quot;</span><span class="expression-language">#{</span><span class="expression-language">problem1Bean</span><span class="expression-language">.</span><span class="expression-language">convert</span><span class="expression-language">}</span><span class="ST5">&quot;</span> <span class="ST4">update</span><span class="ST4">=</span><span class="ST5">&quot;output1 output2&quot;</span><span class="ST3">/</span><span class="ST6">&gt;</span>
<span class="ST6">&lt;/</span><span class="ST6">h:form</span><span class="ST6">&gt;</span>
<span class="ST6">&lt;/</span><span class="ST6">h:body</span><span class="ST6">&gt;</span>
<span class="ST3">&lt;/</span><span class="ST3">html</span><span class="ST3">&gt;</span>
</pre></body>
</html>