111 lines
6.8 KiB
Plaintext
Executable File
111 lines
6.8 KiB
Plaintext
Executable File
<ui:composition
|
|
xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:f="http://java.sun.com/jsf/core"
|
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
xmlns:p="http://primefaces.org/ui"
|
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
|
template="/WEB-INF/templates/template.xhtml">
|
|
<ui:define name="content">
|
|
|
|
<h:form id="formTable">
|
|
<ui:include src="/WEB-INF/templates/queryEvent.xhtml">
|
|
<ui:param name="controller" value="#{profileController}" />
|
|
<ui:param name="paramQueryProcess" value="filters" />
|
|
<ui:param name="paramQueryUpdate" value="data-content" />
|
|
<ui:param name="paramSaveProcess" value="" />
|
|
<ui:param name="paramSaveUpdate" value="" />
|
|
<ui:param name="focus" value="formTable\\:query" />
|
|
</ui:include>
|
|
|
|
<p:panelGrid id="filters" columns="4" styleClass="m-filters">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_general.lbl_filters}" />
|
|
</f:facet>
|
|
|
|
<p:outputLabel for="fpk" value="#{msg_general.lbl_code}:" />
|
|
<p:inputText id="fpk" value="#{profileController.mfilters['pk']}" maxlength="20" style="width: 250px;" />
|
|
|
|
<p:outputLabel for="fdesc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="fdesc" value="#{profileController.mfilters['description']}" maxlength="60" style="width: 250px;" />
|
|
|
|
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<p:commandButton id="query" value="#{msg_general.btn_query}" icon="ui-icon-search" action="#{profileController.query()}" update="process" process="@this, filters "/>
|
|
<p:commandButton value="#{msg_general.btn_previous}" update="process" icon="ui-icon-seek-prev" action="#{profileController.previous()}" />
|
|
<p:commandButton value="#{msg_general.btn_next}" update="process" icon="ui-icon-seek-next" action="#{profileController.next()}" />
|
|
<p:commandButton value="#{msg_general.btn_create}" update=":formProcess:pEdit" oncomplete="PF('dialog').show()" icon="ui-icon-plus" action="#{profileController.create()}" process="@this">
|
|
<f:setPropertyActionListener target="#{profileController.newRow}" value="#{true}" />
|
|
<f:setPropertyActionListener target="#{profileController.showRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
<p:commandButton value="#{msg_general.btn_save}" icon="ui-icon-disk" action="#{profileController.save()}" />
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content" >
|
|
<f:facet name="header">
|
|
<h:outputText value="PERFILES" />
|
|
</f:facet>
|
|
<p:dataTable id="process" var="row" value="#{profileController.lrecord}" rows="200" rowKey="#{row.rowkey()}" selectionMode="single" >
|
|
<p:column headerText="#{msg_general.lbl_code}" resizable="true" style="width:150px" sortBy="#{row.pk}" >
|
|
<h:outputText value="#{row.pk}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_general.lbl_description}" resizable="true" sortBy="#{row.description}" >
|
|
<h:outputText value="#{row.description}" />
|
|
</p:column>
|
|
|
|
|
|
<p:column>
|
|
<p:commandButton value="#{msg_general.btn_edit}" update=":formProcess:pEdit" oncomplete="PF('dialog').show()" styleClass="m-action-button" icon="ui-icon-pencil" process="@this, process">
|
|
<f:setPropertyActionListener target="#{profileController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{profileController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{profileController.newRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
<p:column>
|
|
<p:commandButton value="#{msg_general.btn_delete}" update=":formTable:process" styleClass="m-action-button" icon="ui-icon-trash" action="#{profileController.remove()}" process="@this, process">
|
|
<f:setPropertyActionListener target="#{profileController.record}" value="#{row}" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
|
|
|
|
</p:dataTable>
|
|
</p:panelGrid>
|
|
</h:form>
|
|
|
|
<p:dialog widgetVar="dialog" resizable="false" closeOnEscape="true" modal="true" appendTo="@(body)" showEffect="explode" hideEffect="explode"
|
|
styleClass="m-dialog">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_general.lbl_createoredit}" />
|
|
</f:facet>
|
|
<h:form id="formProcess">
|
|
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
|
|
<h:panelGrid id="pEdit" columns="1" bodyrows="1" >
|
|
|
|
|
|
<p:outputLabel for="pcode" value="#{msg_general.lbl_code}:" />
|
|
<pe:keyFilter/>
|
|
<p:inputText id="pcode"
|
|
value="#{profileController.record.pk}"
|
|
required="true" maxlength="150"
|
|
style="width:250px;" />
|
|
<p:message for="pcode" />
|
|
|
|
<p:outputLabel for="desc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="desc" value="#{profileController.record.description}" maxlength="20" style="width: 250px;" />
|
|
|
|
|
|
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="2" >
|
|
<p:commandButton value="#{msg_general.btn_update}" update=":formTable:data-content"
|
|
action="#{profileController.update()}" process="@this, pEdit"
|
|
icon="ui-icon-disk" oncomplete="if(args.validationFailed){return false;} PF('dialog').hide()" />
|
|
<p:commandButton value="#{msg_general.btn_cancell}" oncomplete="PF('dialog').hide()" icon="ui-icon-trash" process="@this" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
</ui:define>
|
|
</ui:composition> |