<?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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <ui:composition template="/template.xhtml"> <ui:define name="title"> <h:outputText value="#{bundle.ListEmployeTitle}"></h:outputText> </ui:define> <ui:define name="body"> <h:form styleClass="jsfcrud_list_form"> <h:panelGroup id="messagePanel" layout="block"> <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/> </h:panelGroup> <h:outputText escape="false" value="#{bundle.ListEmployeEmpty}" rendered="#{employeController.items.rowCount == 0}"/> <h:panelGroup rendered="#{employeController.items.rowCount > 0}"> <p:dataTable value="#{employeController.findAll()}" var="item" paginator="true" rows="10" sortBy="#{item.nom}" resizableColumns="true" draggableColumns="true" emptyMessage="Aucun employé trouvé" style="border:solid 1px"> <p:column sortBy="#{item.salaire}" headerText="#{bundle.ListEmployeTitle_salaire}" filterBy="#{item.salaire}"> <h:outputText value="#{item.salaire}"/> </p:column> <p:column> <f:facet name="header"> <h:outputText value="#{bundle.ListEmployeTitle_superieur}"/> </f:facet> <h:outputText value="#{item.superieur}"/> </p:column> <p:column sortBy="#{item.departement.id}" filterBy="#{item.departement.id}"> <f:facet name="header"> <h:outputText value="#{bundle.ListEmployeTitle_departement}"/> </f:facet> <h:outputText value="#{item.departement}"/> </p:column> <p:column> <f:facet name="header"> <h:outputText value="#{bundle.ListEmployeTitle_id}"/> </f:facet> <h:outputText value="#{item.id}"/> </p:column> <p:column sortBy="#{item.nom}" filterBy="#{item.nom}"> <f:facet name="header"> <h:outputText value="#{bundle.ListEmployeTitle_nom}"/> </f:facet> <h:outputText value="#{item.nom}"/> </p:column> <p:column> <f:facet name="header"> <h:outputText value="&nbsp;"/> </f:facet> <h:commandLink action="#{employeController.prepareView}" value="#{bundle.ListEmployeViewLink}"/> <h:outputText value=" "/> <h:commandLink action="#{employeController.prepareEdit}" value="#{bundle.ListEmployeEditLink}"/> <h:outputText value=" "/> <h:commandLink action="#{employeController.destroy}" value="#{bundle.ListEmployeDestroyLink}"/> </p:column> </p:dataTable> </h:panelGroup> <br /> <h:commandLink action="#{employeController.prepareCreate}" value="#{bundle.ListEmployeCreateLink}"/> <br /> <br /> <h:link outcome="/index" value="#{bundle.ListEmployeIndexLink}"/> </h:form> </ui:define> </ui:composition> </html>