maia/.svn/pristine/53/537d012c64579eff6fb6b720b17...

164 lines
11 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="#{tiposArmasExplosivosController}"
queryProcess=":formTable:filters" queryUpdate=":formTable:dt-table"
saveProcess="" saveUpdate="" focusContainer=":formTable:filters" />
<p:panelGrid id="filters" columns="1" styleClass="m-filters"
style="padding-right: 50px;">
<f:facet name="header">
<h:outputText value="#{msg_general.lbl_filters}" />
</f:facet>
<h:panelGrid columns="3">
<p:outputLabel for="fpkclase" value="#{msg_armas.lbl_clase}:" />
<p:inputText id="fpkclase" value="#{tiposArmasExplosivosController.mfilelds['clasedescription']}" style="width: 250px;" disabled="true" />
<p:commandButton id="lovClase" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openClaseLov()}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnClaseLov}" update="filters,data-content" />
</p:commandButton>
<p:outputLabel for="fpklongitud" value="#{msg_armas.lbl_longitud}:" rendered="#{tiposArmasExplosivosController.isArmaFuego}"/>
<p:inputText id="fpklongitud" value="#{tiposArmasExplosivosController.mfilelds['longituddescription']}" style="width: 250px;" disabled="true" rendered="#{tiposArmasExplosivosController.isArmaFuego}"/>
<p:commandButton id="lovLongitud" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openLogitudLov()}" rendered="#{tiposArmasExplosivosController.isArmaFuego}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnLogitudLov}" update="filters,data-content" />
</p:commandButton>
<p:outputLabel for="fpktipo" value="#{msg_armas.lbl_tipo}:" />
<p:inputText id="fpktipo" value="#{tiposArmasExplosivosController.mfilelds['tipodescription']}" style="width: 250px;" disabled="true" />
<p:commandButton id="lovTipo" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openTipoLov()}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnTipoLov}" update="filters,data-content" />
</p:commandButton>
<p:outputLabel for="fpkcalibre" value="#{msg_armas.lbl_calibre}:" rendered="#{tiposArmasExplosivosController.isArmaFuego}"/>
<p:inputText id="fpkcalibre" value="#{tiposArmasExplosivosController.mfilelds['calibredescription']}" style="width: 250px;" disabled="true" rendered="#{tiposArmasExplosivosController.isArmaFuego}"/>
<p:commandButton id="lovCalibre" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openCalibreLov()}" rendered="#{tiposArmasExplosivosController.isArmaFuego}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnCalibreLov}" update="filters,data-content" />
</p:commandButton>
</h:panelGrid>
</p:panelGrid>
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
<maia:pageControls controller="#{tiposArmasExplosivosController}"
queryProcess=":formTable:filters"
queryUpdate=":formTable:filters :formTable:dt-table"
createProcess=":formTable:filters"
createUpdate=":formdialogo:pEdit, :formTable:filters"
dialogWidgetVar="dialog" />
</h:panelGrid>
<p:panelGrid id="data-content" columns="1"
styleClass="m-data-content">
<f:facet name="header">
<h:outputText value="#{msg_armas.htbl_TiposDeArmasExplosivos}" />
</f:facet>
<p:dataTable id="dt-table" var="row"
value="#{tiposArmasExplosivosController.lrecord}" rows="200"
style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}"
selectionMode="single" rowIndexVar="rowIndex">
<p:column headerText="#{msg_armas.lbl_clase}" resizable="true" sortBy="#{row.modifiedData['nclase']}" style="width:100px">
<h:outputText value="#{row.modifiedData['nclase']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_longitud}" resizable="true" sortBy="#{row.modifiedData['nlongitud']}" style="width:100px">
<h:outputText value="#{row.modifiedData['nlongitud']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_tipo}" resizable="true" sortBy="#{row.modifiedData['ntipo']}" style="width:150px">
<h:outputText value="#{row.modifiedData['ntipo']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_calibre}" resizable="true" sortBy="#{row.modifiedData['ncalibre']}" style="width:150px">
<h:outputText value="#{row.modifiedData['ncalibre']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_unidad}" resizable="true" sortBy="#{row.modifiedData['nunidadMedidaPeso']}" style="width:150px">
<h:outputText value="#{row.modifiedData['nunidadMedidaPeso']}" />
</p:column>
<p:column styleClass="m-action-column" headerText="" style="text-align:center; width:50px">
<p:commandButton value="#{msg_general.btn_edit}" update=":formdialogo:pEdit" styleClass="m-action-button" icon="ui-icon-pencil" process="@this, :formTable:data-content" action="#{tiposArmasExplosivosController.actualizar}" oncomplete="PF('dialog').show()" >
<f:setPropertyActionListener target="#{tiposArmasExplosivosController.record}" value="#{row}" />
<f:setPropertyActionListener target="#{tiposArmasExplosivosController.showRow}" value="#{false}" />
<f:setPropertyActionListener target="#{tiposArmasExplosivosController.newRow}" value="#{false}" />
</p:commandButton>
</p:column>
<p:column styleClass="m-action-column" headerText="" style="text-align:center; width:50px">
<p:commandButton value="#{msg_general.btn_delete}"
update=":formTable:dt-table" styleClass="m-action-button"
icon="ui-icon-trash"
action="#{tiposArmasExplosivosController.remove()}"
process="@this, dt-table">
<f:setPropertyActionListener target="#{tiposArmasExplosivosController.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="formdialogo">
<p:messages id="messages" autoUpdate="true" globalOnly="true" />
<p:panelGrid id="pEdit" columns="3">
<p:outputLabel for="fpkclaseD" value="#{msg_armas.lbl_clase}: *" />
<p:inputText id="fpkclaseD" value="#{tiposArmasExplosivosController.mfilelds['clasedescriptionD']}" style="width: 250px;" disabled="true" />
<p:commandButton id="lovClaseD" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openClaseLov()}" process="@this" styleClass="m-lov-button" rendered="#{tiposArmasExplosivosController.record.isnew}">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnClaseDialogLov}" update="pEdit" />
</p:commandButton>
<p:outputLabel id="auxClase" rendered="#{!tiposArmasExplosivosController.record.isnew}"/>
<p:outputLabel for="fpklongitudD" value="#{msg_armas.lbl_longitud}: *" rendered="#{tiposArmasExplosivosController.isArmaFuegoD}"/>
<p:inputText id="fpklongitudD" value="#{tiposArmasExplosivosController.mfilelds['longituddescriptionD']}" style="width: 250px;" disabled="true" rendered="#{tiposArmasExplosivosController.isArmaFuegoD}"/>
<p:commandButton id="lovLongitudD" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openLogitudDialogLov()}" rendered="#{tiposArmasExplosivosController.record.isnew and tiposArmasExplosivosController.isArmaFuegoD}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnLogitudDialogLov}" update="pEdit" />
</p:commandButton>
<p:outputLabel id="auxLongitud" rendered="#{!tiposArmasExplosivosController.record.isnew and tiposArmasExplosivosController.isArmaFuegoD}"/>
<p:outputLabel for="fpktipoD" value="#{msg_armas.lbl_tipo}: *" />
<p:inputText id="fpktipoD" value="#{tiposArmasExplosivosController.mfilelds['tipodescriptionD']}" style="width: 250px;" disabled="true" />
<p:commandButton id="lovTipoD" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openTipoDialogLov()}" process="@this" styleClass="m-lov-button" rendered="#{tiposArmasExplosivosController.record.isnew}">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnTipoDialogLov}" update="pEdit" />
</p:commandButton>
<p:outputLabel id="auxTipo" rendered="#{!tiposArmasExplosivosController.record.isnew}"/>
<p:outputLabel for="fpkcalibreD" value="#{msg_armas.lbl_calibre}: *" rendered="#{tiposArmasExplosivosController.isArmaFuegoD or tiposArmasExplosivosController.claseD=='0010000008' or tiposArmasExplosivosController.claseD=='0010000002'}"/>
<p:inputText id="fpkcalibreD" value="#{tiposArmasExplosivosController.mfilelds['calibredescriptionD']}" style="width: 250px;" disabled="true" rendered="#{tiposArmasExplosivosController.isArmaFuegoD or tiposArmasExplosivosController.claseD=='0010000008' or tiposArmasExplosivosController.claseD=='0010000002'}"/>
<p:commandButton id="lovCalibreD" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openCalibreLov()}" rendered="#{tiposArmasExplosivosController.isArmaFuegoD or tiposArmasExplosivosController.claseD=='0010000008' or tiposArmasExplosivosController.claseD=='0010000002'}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnCalibreDialogLov}" update="pEdit" />
</p:commandButton>
<p:outputLabel for="fpkunidadD" value="#{msg_armas.lbl_unidad}:" />
<p:inputText id="fpkunidadD" value="#{tiposArmasExplosivosController.mfilelds['unidaddescriptionD']}" style="width: 250px;" disabled="true" />
<p:commandButton id="lovUnidadD" icon="ui-icon-link" actionListener="#{tiposArmasExplosivosController.openUnidadLov()}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{tiposArmasExplosivosController.onReturnUnidadDialogLov}" update="pEdit" />
</p:commandButton>
</p:panelGrid>
<h:panelGrid columns="2">
<maia:dialogControls controller="#{tiposArmasExplosivosController}"
process=":formdialogo:pEdit"
update=":formdialogo:pEdit, :formTable:dt-table"
dialogWidgetVar="dialog" />
</h:panelGrid>
</h:form>
</p:dialog>
</ui:define>
</ui:composition>