Created
December 28, 2017 22:55
-
-
Save anonymous/b91b00d863b712eb2c2c91a5b38ac0b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<ui:composition template="/template/dash.xhtml" | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:ui="http://java.sun.com/jsf/facelets" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:p="http://primefaces.org/ui"> | |
<ui:define name="title"> | |
<h:outputText value="#{msg['brand.title']}" /> | |
</ui:define> | |
<ui:define name="content"> | |
<p:growl id="globalMessages" for="globalMessages" showDetail="true" /> | |
<p> | |
<p:commandButton value="#{msg['brand.add']}" actionListener="#{brandBean.showAddDialog()}" /> | |
</p> | |
<h:form id="brandTableForm"> | |
<p:dataTable value="#{brandBean.allBrands}" var="b" | |
paginator="true" rows="10" rowsPerPageTemplate="10,20,30" sortMode="multiple"> | |
<p:column headerText="#{msg['global.name']}" sortBy="#{b.name}"> | |
<h:outputText value="#{b.name}" /> | |
</p:column> | |
<p:column headerText="#{msg['global.active']}" sortBy="#{b.active}"> | |
<h:outputText value="Yes" rendered="#{b.active eq 'Y'}" /> | |
<h:outputText value="No" rendered="#{b.active eq 'N'}" /> | |
</p:column> | |
<p:column headerText="#{msg['global.inclusion']}" sortBy="#{b.inclusion}"> | |
<h:outputText value="#{b.inclusion}"> | |
<f:convertDateTime pattern="dd/MM/yyyy hh:mm:ss" /> | |
</h:outputText> | |
</p:column> | |
<p:column headerText="#{msg['global.alteration']}" sortBy="#{b.alteration}"> | |
<h:outputText value="#{b.alteration}"> | |
<f:convertDateTime pattern="dd/MM/yyyy hh:mm:ss" /> | |
</h:outputText> | |
</p:column> | |
<p:column headerText="#{msg['global.actions']}"> | |
<p:commandButton value="#{msg['global.edit']}" | |
actionListener="#{brandBean.showEditDialog(b)}" /> | |
<p:commandButton value="#{msg['global.activate']}" rendered="#{b.active eq 'N'}" | |
actionListener="#{brandBean.activate(b)}" update="@form globalMessages" /> | |
<p:commandButton value="#{msg['global.inactivate']}" rendered="#{b.active eq 'Y'}" | |
actionListener="#{brandBean.inactivate(b)}" update="@form globalMessages" /> | |
</p:column> | |
</p:dataTable> | |
</h:form> | |
<p:dialog header="#{msg['brand.info']}" widgetVar="brandDialog" modal="true" resizable="false"> | |
<h:form id="brandForm"> | |
<p:messages showDetail="true" /> | |
<p:fieldset legend="#{msg['brand.info']}"> | |
<h:panelGrid columns="2"> | |
<p:outputLabel value="#{msg['global.name']}" for="name" /> | |
<p:inputText id="name" value="#{brandBean.brand.name}" maxlength="32" autocomplete="off" /> | |
</h:panelGrid> | |
</p:fieldset> | |
<p> | |
<p:commandButton value="#{msg['global.save']}" action="#{brandBean.save()}" | |
update="@form" process="@form" /> | |
</p> | |
</h:form> | |
<p:ajax event="close" update=":brandForm" resetValues="true" /> | |
</p:dialog> | |
</ui:define> | |
</ui:composition> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment