136 lines
7.5 KiB
Plaintext
Executable File
136 lines
7.5 KiB
Plaintext
Executable File
<ui:composition
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:f="http://java.sun.com/jsf/core"
|
|
xmlns:c="http://java.sun.com/jstl/core"
|
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
xmlns:p="http://primefaces.org/ui"
|
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
|
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents"
|
|
template="/WEB-INF/templates/template.xhtml">
|
|
|
|
<ui:define name="content">
|
|
<h:form id="formTable">
|
|
<maia:pageEvents controller="#{inspeccionCambioArchivoController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:tablaInspeccion"
|
|
saveProcess=""
|
|
saveUpdate=""
|
|
focusContainer=":formTable:filters" />
|
|
|
|
<p:panelGrid id="filters" columns="5" styleClass="m-filters">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_general.lbl_filters}" />
|
|
</f:facet>
|
|
|
|
<p:outputLabel for="fname" value="Código solicitud:" />
|
|
<p:inputText id="fname" value="#{inspeccionCambioArchivoController.mfilelds['codigosolicitud']}"
|
|
style="width: 360px;" required="true" />
|
|
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<maia:pageControls controller="#{inspeccionCambioArchivoController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:filters :formTable:tablaInspeccion"
|
|
createUpdate=":formProcess:pEdit"
|
|
dialogWidgetVar="dialog"
|
|
showCreateBtn="false"
|
|
showSaveBtn="false" />
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content">
|
|
<f:facet name="header">
|
|
<h:outputText value="Archivo(s) de inspección" />
|
|
</f:facet>
|
|
<p:dataTable id="tablaInspeccion" var="row" value="#{inspeccionCambioArchivoController.lrecord}" rows="200" style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}" selectionMode="single">
|
|
|
|
<p:column headerText="#{msg_general.lbl_code}" resizable="true" sortBy="#{row.pk}">
|
|
<h:outputText value="#{row.pk}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_general.lbl_description}" resizable="true" sortBy="#{row.descripcion}" >
|
|
<h:outputText value="#{row.descripcion}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="Ruta alfresco" resizable="true" >
|
|
<h:outputText value="#{row.xpath}" />
|
|
</p:column>
|
|
|
|
<p:column>
|
|
<maia:alfrescoDocDownload
|
|
controllerAlfresco="#{inspeccionCambioArchivoController.alfrescoController}"
|
|
xPathLocation="#{row.xpath}"
|
|
label="#{msg_armas.btn_descargarDocumentos}" immediate="true" />
|
|
</p:column>
|
|
|
|
|
|
<p:column styleClass="m-action-column">
|
|
<p:commandButton rendered="#{row.xpath != null}"
|
|
value="#{msg_general.btn_edit}" update=":formProcess:pEdit" oncomplete="PF('dialog').show()"
|
|
styleClass="m-action-button" icon="ui-icon-pencil" process="@this, :formTable:data-content">
|
|
<f:setPropertyActionListener target="#{inspeccionCambioArchivoController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{inspeccionCambioArchivoController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{inspeccionCambioArchivoController.newRow}" value="#{false}" />
|
|
</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="3">
|
|
<p:outputLabel for="pkcatalog" value="#{msg_general.lbl_code}:" />
|
|
<p:inputText id="pkcatalog" value="#{inspeccionCambioArchivoController.record.pk}" disabled="true" maxlength="20" style="width:160px;"
|
|
onkeyup="Maia.forceupper(event, this);" />
|
|
<p:message for="pkcatalog" />
|
|
|
|
<p:outputLabel for="desc" value="#{msg_general.lbl_description}:" />
|
|
<p:inputText id="desc" value="#{inspeccionCambioArchivoController.record.descripcion}" disabled="true" />
|
|
<p:message for="desc" />
|
|
|
|
<p:outputLabel for="observacion" value="Observación:" />
|
|
<p:inputTextarea id="observacion" value="#{inspeccionCambioArchivoController.record.observacion}" required="true"
|
|
cols="80" rows="2" maxlength="300"/>
|
|
<p:message for="observacion" />
|
|
|
|
<!-- documento -->
|
|
<p:outputLabel for="fileUploadCmpt" value="Documento:" />
|
|
<h:panelGrid columns="1" >
|
|
<h:outputText value="#{msg_armas['msg_tamano_archivo_requisitos_jpg_png_1']}" style="color:blue;font-weight: bold;"/>
|
|
<p:fileUpload id="fileUploadCmpt" fileUploadListener="#{inspeccionCambioArchivoController.handleUpload}" update="descFileUpload"
|
|
allowTypes="/(\.|\/)(pdf|jpeg|jpg|png)$/" description="Seleccionar documento"
|
|
fileLimit="1"
|
|
required="true"
|
|
label="#{msg_armas.lbl_seleccionar}"
|
|
uploadLabel="#{msg_armas.lbl_subir}"
|
|
cancelLabel="#{msg_armas.lbl_cancelar}"
|
|
invalidFileMessage="#{msg_armas['msg_error_tipoarchivoinvalido']}"
|
|
invalidSizeMessage="#{msg_armas.lbl_mensajearchivoinvalidom} #{msg_armas.lbl_1mb}"
|
|
fileLimitMessage="#{msg_armas['msg_error_exedeelnumero']}"
|
|
sizeLimit="#{msg_armas.lbl_archivounmega}"
|
|
/>
|
|
</h:panelGrid>
|
|
<p:message for="fileUploadCmpt" />
|
|
</h:panelGrid>
|
|
<h:panelGrid id="descFileUpload" columns="1" style="width:100%;" >
|
|
<p:outputLabel value="#{inspeccionCambioArchivoController.recorteNombre(inspeccionCambioArchivoController.uploadedFile.fileName)}"
|
|
rendered="#{inspeccionCambioArchivoController.uploadedFile != null}"/>
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="2" styleClass="m-dialog-controls">
|
|
<maia:dialogControls controller="#{inspeccionCambioArchivoController}"
|
|
process=":formProcess:pEdit"
|
|
update=":formProcess:pEdit, :formTable:tablaInspeccion "
|
|
dialogWidgetVar="dialog" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
</ui:define>
|
|
</ui:composition> |