152 lines
8.2 KiB
Plaintext
Executable File
152 lines
8.2 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="#{officeAndBranchController}"
|
|
queryProcess=":formTable:tabmenus:filtersBranch"
|
|
queryUpdate=":formTable:tabmenus:dataContentBranch"
|
|
saveProcess=":formTable:tabmenus"
|
|
saveUpdate=":formTable:tabmenus"
|
|
focusContainer=":formTable:tabmenus:filtersBranch" />
|
|
|
|
<p:tabView id="tabmenus" dynamic="true" cache="true">
|
|
<p:tab id="menulevel" title="#{msg_general.tab_branches}">
|
|
<ui:include src="_branch.xhtml" />
|
|
</p:tab>
|
|
<p:tab id="menusublebel" title="#{msg_general.tab_offices}" >
|
|
<ui:include src="_office.xhtml" />
|
|
</p:tab>
|
|
</p:tabView>
|
|
</h:form>
|
|
|
|
|
|
<p:dialog widgetVar="dialgoBranch" 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="formDialogBranch">
|
|
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
|
|
<h:panelGrid id="pEdit" columns="3" bodyrows="1" >
|
|
<p:outputLabel for="pk" value="#{msg_general.lbl_code}:" />
|
|
<h:outputText value="#{officeAndBranchController.branch.record.pk.branchcode}" rendered="#{!officeAndBranchController.branch.newRow}"/>
|
|
<p:inputText id="pk" value="#{officeAndBranchController.branch.record.pk.branchcode}" rendered="#{officeAndBranchController.branch.newRow}" maxlength="3"
|
|
style="width:40px;" required="true">
|
|
<pe:keyFilter regEx="/[\d\-]/"/>
|
|
</p:inputText>
|
|
<p:message for="pk" />
|
|
|
|
<p:outputLabel for="descripcion" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="descripcion"
|
|
value="#{officeAndBranchController.branch.record.description}"
|
|
required="true" maxlength="80"
|
|
onkeyup="Maia.forceupper(event, this);" style="width:350px;" />
|
|
<p:message for="descripcion" />
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<maia:dialogControls controller="#{officeAndBranchController.branch}"
|
|
process=":formDialogBranch:pEdit"
|
|
update=":formDialogBranch:pEdit, :formTable:tabmenus:tableBranch"
|
|
dialogWidgetVar="dialgoBranch" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
<p:dialog widgetVar="dialogOffice" 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="formDialogOffice">
|
|
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
|
|
<h:panelGrid id="pEdit" columns="3" bodyrows="1" >
|
|
<p:outputLabel for="branch" value="#{msg_general.lbl_branch}:" />
|
|
<h:outputText id="branch" value="#{officeAndBranchController.office.record.modifiedData['branchdesc']}"/>
|
|
<p:message for="branch" />
|
|
|
|
<p:outputLabel for="pk" value="#{msg_general.lbl_code}:" />
|
|
<h:outputText value="#{officeAndBranchController.office.record.pk.officecode}" rendered="#{!officeAndBranchController.office.newRow}"/>
|
|
<p:inputText id="pk" value="#{officeAndBranchController.office.record.pk.officecode}" rendered="#{officeAndBranchController.office.newRow}" maxlength="3"
|
|
style="width:40px;" required="true">
|
|
<pe:keyFilter regEx="/[\d\-]/"/>
|
|
</p:inputText>
|
|
<p:message for="pk" />
|
|
|
|
<p:outputLabel for="country" value="#{msg_general.lbl_country}:"/>
|
|
<p:selectOneMenu id="country" value="#{officeAndBranchController.office.record.countrycode}"
|
|
var="p" style="width:140px" panelStyle="width:140px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<p:ajax listener="#{officeAndBranchController.onChangeCountry()}" event="change" update="province, canton, city"></p:ajax>
|
|
<f:selectItems value="#{officeAndBranchController.lCountry}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="country" />
|
|
|
|
<p:outputLabel for="province" value="#{msg_general.lbl_province}:"/>
|
|
<p:selectOneMenu id="province" value="#{officeAndBranchController.office.record.provincecode}"
|
|
var="p" style="width:140px" panelStyle="width:140px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<p:ajax listener="#{officeAndBranchController.onChangeProvince()}" event="change" update="canton, city"></p:ajax>
|
|
<f:selectItems value="#{officeAndBranchController.lProvince}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.provincecode}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="province" />
|
|
|
|
<p:outputLabel for="canton" value="#{msg_general.lbl_canton}:"/>
|
|
<p:selectOneMenu id="canton" value="#{officeAndBranchController.office.record.cantoncode}"
|
|
var="p" style="width:140px" panelStyle="width:140px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<p:ajax listener="#{officeAndBranchController.onChangeCanton()}" event="change" update="city"></p:ajax>
|
|
<f:selectItems value="#{officeAndBranchController.lCanton}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.cantoncode}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="canton" />
|
|
|
|
<p:outputLabel for="city" value="#{msg_general.lbl_city}:"/>
|
|
<p:selectOneMenu id="city" value="#{officeAndBranchController.office.record.citycode}"
|
|
var="p" style="width:140px" panelStyle="width:140px" required="true">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{officeAndBranchController.lCity}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.citycode}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="city" />
|
|
|
|
<p:outputLabel for="descripcion" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="descripcion"
|
|
value="#{officeAndBranchController.office.record.description}"
|
|
required="true" maxlength="80"
|
|
onkeyup="Maia.forceupper(event, this);" style="width:350px;" />
|
|
<p:message for="descripcion" />
|
|
|
|
<p:outputLabel for="address" value="#{msg_general.lbl_address}:" />
|
|
<p:inputText id="address"
|
|
value="#{officeAndBranchController.office.record.address}"
|
|
required="true" maxlength="120"
|
|
onkeyup="Maia.forceupper(event, this);" style="width:350px;" />
|
|
<p:message for="address" />
|
|
|
|
<p:outputLabel for="phone" value="#{msg_general.lbl_phone}:" />
|
|
<p:inputText id="phone" value="#{officeAndBranchController.office.record.phone}" maxlength="12"
|
|
style="width:100px;" required="true">
|
|
<pe:keyFilter regEx="/[\d\-]/"/>
|
|
</p:inputText>
|
|
<p:message for="phone" />
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<maia:dialogControls controller="#{officeAndBranchController.office}"
|
|
process=":formDialogOffice:pEdit"
|
|
update=":formDialogOffice:pEdit :formTable:tabmenus:tableOffice"
|
|
dialogWidgetVar="dialogOffice" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
</ui:define>
|
|
</ui:composition> |