63 lines
3.9 KiB
Plaintext
Executable File
63 lines
3.9 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:body>
|
|
<h:form id="formTable" >
|
|
<maia:pageEvents controller="#{chargesDefinitionController}"
|
|
queryProcess=":formTable:filters, :formTable:tabprincipal:formSubproduct:filters"
|
|
queryUpdate=":formTable:tabprincipal:formSubproduct:subprod, :formTable:tabprincipal:formCharges:charges, :formTable:module"
|
|
saveProcess=":formTable:tabprincipal"
|
|
saveUpdate=""
|
|
focusContainer=":formTable:module" />
|
|
|
|
<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="module" value="#{msg_general.lbl_module}:" />
|
|
<p:selectOneMenu id="module" value="#{chargesDefinitionController.mfilters['pk.modulecode']}" style="width:300px" panelStyle="width:300px">
|
|
<p:ajax event="change" listener="#{chargesDefinitionController.updatemodule()}" update=":formTable:tabprincipal:formCharges:charges,
|
|
:formTable:tabprincipal:formSubproduct:filters, :formTable:tabprincipal:formSubproduct:subprod" process="filters"/>
|
|
<f:selectItem itemLabel="" itemValue="" />
|
|
<f:selectItems value="#{chargesDefinitionController.lmodules}" var="vmod" itemLabel="#{vmod.description}" itemValue="#{vmod.pk}" />
|
|
</p:selectOneMenu>
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="8" id="controls" styleClass="m-controls">
|
|
<maia:pageControls controller="#{chargesDefinitionController}" showCreateBtn="false" showSaveBtn="false"
|
|
queryProcess=":formTable:filters, :formTable:tabprincipal:formSubproduct:filters"
|
|
queryUpdate=":formTable:tabprincipal:formCharges:data-content, :formTable:tabprincipal:formSubproduct:data-content"
|
|
/>
|
|
<p:commandButton value="#{msg_general.btn_create}" update=":formTable:tabprincipal:formDialogCharges:pEdit" oncomplete="if(args.validationFailed){return false;} dialogcharges.show()" icon="ui-icon-plus"
|
|
action="#{chargesDefinitionController.charges.create()}" process="@this" rendered="#{!chargesDefinitionController.active}">
|
|
<f:setPropertyActionListener target="#{chargesDefinitionController.charges.newRow}" value="#{true}" />
|
|
<f:setPropertyActionListener target="#{chargesDefinitionController.charges.showRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
<p:commandButton value="#{msg_general.btn_create}" update=":formTable:tabprincipal:formDialogSubprod:pEdit" oncomplete="if(args.validationFailed){return false;} dialogprod.show()" icon="ui-icon-plus"
|
|
action="#{chargesDefinitionController.subproduct.create()}" process="@this" rendered="#{chargesDefinitionController.active}">
|
|
<f:setPropertyActionListener target="#{chargesDefinitionController.subproduct.newRow}" value="#{true}" />
|
|
<f:setPropertyActionListener target="#{chargesDefinitionController.subproduct.showRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
<p:commandButton value="#{msg_general.btn_save}" icon="ui-icon-disk" action="#{chargesDefinitionController.save()}" />
|
|
</h:panelGrid>
|
|
|
|
<p:tabView id="tabprincipal" dynamic="true" cache="true" styleClass="m-tab-inner">
|
|
<p:ajax event="tabChange" listener="#{chargesDefinitionController.onTabChange}" update=":formTable:controls"/>
|
|
<p:tab id="charges" title="#{msg_general.tab_charges}">
|
|
<ui:include src="_charges.xhtml" />
|
|
</p:tab>
|
|
<p:tab id="subproduct" title="#{msg_general.tab_subproductcharges}">
|
|
<ui:include src="_subproduct.xhtml" />
|
|
</p:tab>
|
|
</p:tabView>
|
|
|
|
</h:form>
|
|
|
|
</h:body>
|
|
</ui:define>
|
|
</ui:composition> |