126 lines
7.7 KiB
Plaintext
Executable File
126 lines
7.7 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"
|
|
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents">
|
|
<ui:define name="content">
|
|
|
|
<h:form id="formTable">
|
|
<maia:pageEvents controller="#{processController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:process"
|
|
focusContainer=":formTable:filters" />
|
|
|
|
<p:panelGrid id="filters" columns="2" styleClass="m-filters">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_general.lbl_filters}" />
|
|
</f:facet>
|
|
|
|
<p:outputLabel for="proctype" value="#{msg_general.lbl_processtype}:" />
|
|
<p:selectOneMenu id="proctype" value="#{processController.mfilters['pk.catalogtypeprocess']}" var="p" style="width:250px" panelStyle="width:250px" >
|
|
<f:selectItem itemLabel="" itemValue="" noSelectionOption="true" />
|
|
<f:selectItems value="#{processController.lprocesstype}" var="vtp" itemLabel="#{vtp.pk.catalog}" itemValue="#{vtp.pk.catalog}"/>
|
|
</p:selectOneMenu>
|
|
|
|
|
|
<p:outputLabel for="fpk" value="#{msg_general.lbl_code}:" />
|
|
<p:inputText id="fpk" value="#{processController.mfilters['pk.processcode']}" maxlength="20" style="width: 450px;" />
|
|
|
|
<p:outputLabel for="fdesc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="fdesc" value="#{processController.mfilters['description']}" maxlength="60" style="width: 450px;" />
|
|
|
|
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<maia:pageControls controller="#{processController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:process"
|
|
createUpdate=":formProcess: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_componentes}" />
|
|
</f:facet>
|
|
<p:dataTable id="process" var="row" value="#{processController.lrecord}" rows="200" rowKey="#{row.rowkey()}" selectionMode="single" >
|
|
<p:column headerText="#{msg_general.lbl_code}" resizable="true" style="width:150px" sortBy="#{row.pk.processcode}" >
|
|
<h:outputText value="#{row.pk.processcode}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_general.lbl_description}" resizable="true" sortBy="#{row.description}" >
|
|
<h:outputText value="#{row.description}" />
|
|
</p:column>
|
|
|
|
|
|
<p:column styleClass="m-action-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="#{processController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{processController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{processController.newRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
<p:column styleClass="m-action-column">
|
|
<p:commandButton value="#{msg_general.btn_delete}" update=":formTable:process" styleClass="m-action-button" icon="ui-icon-trash" action="#{processController.remove()}" process="@this, process">
|
|
<f:setPropertyActionListener target="#{processController.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" >
|
|
<h:panelGrid columns="3">
|
|
|
|
<p:outputLabel for="ptype" value="#{msg_general.lbl_processtype}:" />
|
|
<p:selectOneMenu id="ptype" value="#{processController.record.pk.catalogtypeprocess}" var="p" style="width:250px" panelStyle="width:250px"
|
|
required="true" disabled="#{!processController.newRow}">
|
|
<f:selectItem itemLabel="" itemValue="" />
|
|
<f:selectItems value="#{processController.lprocesstype}" var="vtp" itemLabel="#{vtp.pk.catalog}" itemValue="#{vtp.pk.catalog}"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="ptype" />
|
|
|
|
<p:outputLabel for="pcode" value="#{msg_general.lbl_clase}:" />
|
|
<h:outputText rendered="#{!processController.newRow}" value="#{processController.record.pk.processcode}" />
|
|
<p:inputText id="pcode"
|
|
value="#{processController.record.pk.processcode}"
|
|
required="true" maxlength="150"
|
|
style="width:450px;" rendered="#{processController.newRow}"/>
|
|
<p:message for="pcode" />
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="2">
|
|
<p:outputLabel for="desc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="desc" value="#{processController.record.description}" maxlength="200" style="width: 600px;" />
|
|
|
|
<p:outputLabel for="sdesc" value="#{msg_general.lbl_shortdescription}:" />
|
|
<p:inputText id="sdesc" value="#{processController.record.shortdesc}" maxlength="60" style="width: 600px;" onkeyup="Maia.forceupper(event, this);" />
|
|
</h:panelGrid>
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="2" styleClass="m-dialog-controls">
|
|
<p:commandButton value="#{msg_general.btn_update}"
|
|
action="#{processController.update()}"
|
|
update=":formTable:data-content, :formProcess"
|
|
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> |