blob: d2713585be090134b26d657e7648665e7d410de4 [file] [log] [blame]
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/WEB-INF/template.jsf">
<ui:define name="body">
<h1>Employee Search Results</h1>
<h:form>
<h:dataTable var="emp" value="#{employeeResults.employees}"
class="table-design">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{emp.id}" />
</h:column>
<h:column>
<f:facet name="header">Last Name</f:facet>
<h:outputText value="#{emp.lastName}" />
</h:column>
<h:column>
<f:facet name="header">First Name</f:facet>
<h:outputText value="#{emp.firstName}" />
</h:column>
<h:column>
<h:commandButton value="Edit" action="#{employeeResults.edit(emp)}"
class="button-small" />
<h:commandButton value="Delete" action="#{employeeResults.delete(emp)}"
class="button-small" rendered="false"/>
</h:column>
<f:facet name="footer" rendered="#{employeeResults.hasPaging}">
<table width="100%">
<tr>
<td><h:commandButton value="Previous Page"
action="#{employeeResults.previous}"
rendered="#{employeeResults.hasPrevious}" class="button-small" /></td>
<td width="100%" align="center">Page <h:outputText
value="#{employeeResults.currentPage}" /> of <h:outputText
value="#{employeeResults.numPages}" /></td>
<td><h:commandButton value="Next Page"
action="#{employeeResults.next}"
rendered="#{employeeResults.hasNext}" class="button-small" /></td>
</tr>
</table>
</f:facet>
</h:dataTable>
</h:form>
</ui:define>
<ui:define name="eclipselink">
<h3>Search Results</h3>
<p>Simple table view of Employee instances just showing basic
mappings.</p>
<h3>Pagination</h3>
<p>If pagination is selected you will see different SQL for each
page depending on the pagination type.</p>
</ui:define>
</ui:composition>
</html>