2023-09-27 13:31:02 -05:00

52 lines
2.1 KiB
HTML

<?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>
<title>Building Sophisticated JSF Views with Components</title>
</h:head>
<h:body>
<h:form>
<h1>JSF Components, Creating a Sophisticated Page</h1>
<p>
The view for this page is made up entirely of JSF standard components.
<br/>As you can see, there are many useful components bundled with JSF out of the box.
<br/>
</p>
<p>Book Recommendation: Java 7 Recipes
<br/>
<h:graphicImage style="max-height: 300px; max-width: 300px;"
library="images" name="picture.png"/>
<br/>
<h:outputLabel for="newAuthorFirst" value="New Author First Name: "/>
<h:inputText id="newAuthorFirst" value="#{authorController.newAuthorFirst}"/>
<br/>
<h:outputLabel for="newAuthorLast" value="New Author Last Name: "/>
<h:inputText id="newAuthorLast" value="#{authorController.newAuthorLast}"/>
<br/>
<h:inputTextarea id="bio" cols="20" rows="5"
value="#{authorController.bio}"/>
<br/><br/>
<h:commandButton id="addAuthor" action="#{authorController.addAuthor}"
value="Add Author"/>
<br/><br/>
<h:dataTable id="authorTable"
value="#{authorController.authorList}"
var="author">
<h:column>
<h:outputText id="authorName"
value="#{author.first} #{author.last} #{author.bio}"/>
</h:column>
</h:dataTable>
<h:message for="addAuthor" />
</p>
</h:form>
</h:body>
</html>