102 lines
6.0 KiB
Plaintext
Executable File
102 lines
6.0 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"
|
|
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents"
|
|
template="/WEB-INF/templates/template.xhtml">
|
|
<ui:define name="content">
|
|
<h:form id="formTable">
|
|
<maia:pageEvents controller="#{servicesController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:services"
|
|
focusContainer=":formTable:filters" />
|
|
|
|
<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="#{servicesController.mfilters['pk']}" maxlength="30" style="width: 100px;" onkeydown="Maia.forceupper(event, this);" />
|
|
|
|
<p:outputLabel for="fdesc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="fdesc" value="#{servicesController.mfilters['classname']}" maxlength="150" style="width: 350px;" />
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<maia:pageControls controller="#{servicesController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:services"
|
|
createUpdate=":formService:pEdit"
|
|
dialogWidgetVar="dialog" />
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_general.htbl_catalog}" />
|
|
</f:facet>
|
|
<p:dataTable id="services" var="row" value="#{servicesController.lrecord}" rows="200" style="min-width: 500px; width: auto;" 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_classname}" resizable="true" sortBy="#{row.classname}">
|
|
<h:outputText value="#{row.classname}" />
|
|
</p:column>
|
|
<p:column styleClass="m-action-column">
|
|
<p:commandButton value="#{msg_general.btn_edit}" update=":formService:pEdit" oncomplete="PF('dialog').show()" styleClass="m-action-button" icon="ui-icon-pencil" process="@this, services"
|
|
action="#{servicesController.checkEdit()}">
|
|
<f:setPropertyActionListener target="#{servicesController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{servicesController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{servicesController.newRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
<p:column styleClass="m-action-column">
|
|
<p:commandButton value="#{msg_general.btn_delete}" process="@this, services" update=":formTable:services" styleClass="m-action-button" icon="ui-icon-trash" action="#{servicesController.remove()}">
|
|
<f:setPropertyActionListener target="#{servicesController.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="formService">
|
|
<p:messages id="messages" globalOnly="true"/>
|
|
<h:panelGrid id="pEdit" columns="3" >
|
|
|
|
<p:outputLabel for="codigo" value="#{msg_general.lbl_code}:" />
|
|
<h:outputText rendered="#{!servicesController.newRow}" value="#{servicesController.record.pk}"/>
|
|
<p:inputText id="codigo" rendered="#{servicesController.newRow}" value="#{servicesController.record.pk}" required="true" maxlength="30"
|
|
onkeyup="Maia.forceupper(event, this);" style="width:160px;" />
|
|
<p:message for="codigo" />
|
|
|
|
<p:outputLabel for="descripcion" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="descripcion" value="#{servicesController.record.description}" required="true" maxlength="60"
|
|
onkeyup="Maia.forceupper(event, this);" style="width:400px;" />
|
|
<p:message for="descripcion" />
|
|
|
|
<p:outputLabel for="classname" value="#{msg_general.lbl_classname}:" />
|
|
<p:inputText id="classname" value="#{servicesController.record.classname}" required="true" maxlength="150" style="width:480px;" />
|
|
<p:message for="classname" />
|
|
|
|
<p:outputLabel for="automatic" value="#{msg_general.lbl_automatic}:" />
|
|
<p:selectBooleanCheckbox id="automatic" value="#{servicesController.check}">
|
|
<p:ajax listener="#{servicesController.changeCheck()}"/>
|
|
</p:selectBooleanCheckbox>
|
|
<p:message for="automatic" />
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2" styleClass="m-dialog-controls">
|
|
<maia:dialogControls controller="#{servicesController}"
|
|
process=":formService:pEdit"
|
|
update=":formService:pEdit :formTable:services"
|
|
dialogWidgetVar="dialog" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
</ui:define>
|
|
</ui:composition> |