74 lines
3.5 KiB
Plaintext
Executable File
74 lines
3.5 KiB
Plaintext
Executable File
<ui:component xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:f="http://java.sun.com/jsf/core"
|
|
xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
|
xmlns:p="http://primefaces.org/ui"
|
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
|
xmlns:comp="http://java.sun.com/jsf/composite">
|
|
|
|
<comp:interface
|
|
shortDescription="Componente que incluye los botones de consultar, previo y siguiente pagina. Adicionalmente los botones de crear y grabar">
|
|
<comp:attribute name="controller"
|
|
shortDescription="Controlador de la tabla a dar mantenimiento" />
|
|
<comp:attribute name="queryProcess"
|
|
shortDescription="Widgets a procesar" />
|
|
<comp:attribute name="queryUpdate"
|
|
shortDescription="Widgets a actualizar" />
|
|
<comp:attribute name="saveProcess"
|
|
shortDescription="Widgets a procesar" />
|
|
<comp:attribute name="saveUpdate"
|
|
shortDescription="Widgets a actualizar" />
|
|
|
|
<comp:attribute name="focus"
|
|
shortDescription="Id del elemento a fijar el foco. Ejemplo: 'formTable\\:filters\\fpk' " />
|
|
<comp:attribute name="focusContainer"
|
|
shortDescription="Id del contenedor a fijar el foco, el foco se fija en el primer elemento del contenedor. Ejemplo 'formTable\\:filters' " />
|
|
</comp:interface>
|
|
<comp:implementation>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
Maia.focus('#{cc.attrs.focus}');
|
|
Maia.focusContainer('#{cc.attrs.focusContainer}');
|
|
});
|
|
</script>
|
|
<div id="#{cc.clientId}">
|
|
<p:remoteCommand name="queryFunc"
|
|
action="#{cc.attrs.controller.query()}"
|
|
update="#{cc.attrs.queryUpdate}"
|
|
process="@this #{cc.attrs.queryProcess}" />
|
|
<p:remoteCommand name="previousFunc"
|
|
action="#{cc.attrs.controller.previous()}"
|
|
update="#{cc.attrs.queryUpdate}"
|
|
process="@this, #{cc.attrs.queryProcess}" />
|
|
<p:remoteCommand name="nextFunc"
|
|
action="#{cc.attrs.controller.next()}"
|
|
update="#{cc.attrs.queryUpdate}"
|
|
process="@this, #{cc.attrs.queryProcess}" />
|
|
<p:remoteCommand name="saveFunc"
|
|
action="#{cc.attrs.controller.save()}"
|
|
update="#{cc.attrs.saveUpdate}"
|
|
process="@this, #{cc.attrs.saveProcess}" />
|
|
|
|
<p:confirmDialog header="#{msg_general.lbl_pendding_changes}"
|
|
global="true" showEffect="fade" hideEffect="explode"
|
|
widgetVar="queryConfirmDialog"
|
|
message="#{msg_general.btn_controlcambios}">
|
|
<p:commandButton value="Si" styleClass="ui-confirmdialog-yes"
|
|
icon="ui-icon-check" action="#{cc.attrs.controller.forcedQuery()}"
|
|
update="#{cc.attrs.queryUpdate}"
|
|
process="@this, #{cc.attrs.queryProcess}"
|
|
oncomplete="PF('queryConfirmDialog').hide()" />
|
|
<p:commandButton value="No" type="button"
|
|
styleClass="ui-confirmdialog-no" icon="ui-icon-close"
|
|
onclick="PF('queryConfirmDialog').hide()" />
|
|
</p:confirmDialog>
|
|
|
|
<p:confirmDialog header="#{msg_general.lbl_confirmInitFlow}" global="true" showEffect="fade" hideEffect="explode" widgetVar="confirmFlowDialog" message="#{msg_general.btn_confirmFlow}">
|
|
<p:commandButton value="Si" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" action="#{cc.attrs.controller.iniciarFlujo()}" update="#{cc.attrs.saveUpdate}" process="@this" oncomplete="PF('confirmFlowDialog').hide()" />
|
|
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" onclick="PF('confirmFlowDialog').hide()" />
|
|
</p:confirmDialog>
|
|
</div>
|
|
|
|
</comp:implementation>
|
|
</ui:component> |