185 lines
11 KiB
Plaintext
Executable File
185 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="#{preguntasParaEvaluacionesController}"
|
|
queryProcess=":formTable:filters" queryUpdate=":formTable:filters, :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="fpkTipoEvaluacion" value="#{msg_armas.lbl_tipoEvaluacion}:" />
|
|
<p:selectOneMenu id="fpkTipoEvaluacion" value="#{preguntasParaEvaluacionesController.mfilters['tipoevaluacion']}"
|
|
style="width:250px" required="true">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lTipoEvaluacion}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkTipoEvaluacion" />
|
|
|
|
<p:outputLabel for="fpkTipoPersona" value="#{msg_armas.lbl_tipoPersona}:" />
|
|
<p:selectOneMenu id="fpkTipoPersona" value="#{preguntasParaEvaluacionesController.mfilters['tipopersona']}"
|
|
style="width:250px" required="true">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lTipoPersona}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkTipoPersona" />
|
|
|
|
<p:outputLabel for="fpkEstadoFilter" value="#{msg_armas.lbl_estado}:" />
|
|
<p:selectOneMenu id="fpkEstadoFilter" value="#{preguntasParaEvaluacionesController.mfilters['estadopregunta']}"
|
|
style="width:250px" required="false">
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lEstados}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkEstadoFilter" />
|
|
|
|
<p:outputLabel for="fpkDescripcion" value="#{msg_armas.lbl_descripcionPregunta}:" />
|
|
<p:inputText id="fpkDescripcion" value="#{preguntasParaEvaluacionesController.mfilters['descripcion']}" style="width: 320px;" />
|
|
<p:message for="fpkDescripcion" />
|
|
</h:panelGrid>
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<p:commandButton id="queryControl" value="#{msg_general.btn_query}" icon="ui-icon-search" action="#{preguntasParaEvaluacionesController.query()}" update=":formTable:filters :formTable:dt-table" process="@this, :formTable:filters" />
|
|
<p:commandButton value="#{msg_general.btn_previous}" update="data-content" icon="ui-icon-seek-prev" action="#{preguntasParaEvaluacionesController.previous()}" />
|
|
<p:commandButton value="#{msg_general.btn_next}" update="data-content" icon="ui-icon-seek-next" action="#{preguntasParaEvaluacionesController.next()}" />
|
|
<p:commandButton value="#{msg_general.btn_create}" update=":formTable:data-content,:formdialogo:pEdit" icon="ui-icon-plus" action="#{preguntasParaEvaluacionesController.create()}" process="@this, filters" oncomplete="PF('dialog').show()" immediate="true"/>
|
|
<p:commandButton id="saveControl" value="#{msg_general.btn_save}" icon="ui-icon-disk" process="@this" action="#{preguntasParaEvaluacionesController.save()}" update="data-content"/>
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content" style="text-align: center;">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_armas.fct_datosPreguntasRespuestas}" />
|
|
</f:facet>
|
|
<p:dataTable id="dt-table" var="row"
|
|
value="#{preguntasParaEvaluacionesController.lrecord}" rows="200"
|
|
style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}"
|
|
selectionMode="single">
|
|
|
|
<p:column headerText="#{msg_armas.lbl_numeroPregunta}" style="width:50px;"
|
|
resizable="true" sortBy="#{row.numeropregunta}">
|
|
<h:outputText value="#{row.numeropregunta}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="#{msg_armas.lbl_tipoEvaluacion}" style="width:100px;"
|
|
resizable="true" sortBy="#{row.modifiedData['nTipoEvaluacion']}">
|
|
<h:outputText value="#{row.modifiedData['nTipoEvaluacion']}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="#{msg_armas.lbl_tipoPersona}" style="width:100px;"
|
|
resizable="true" sortBy="#{row.modifiedData['nTipoPersona']}">
|
|
<h:outputText value="#{row.modifiedData['nTipoPersona']}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="#{msg_armas.lbl_estado}" style="width:100px;"
|
|
resizable="true" sortBy="#{row.modifiedData['nEstado']}">
|
|
<h:outputText value="#{row.modifiedData['nEstado']}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="#{msg_armas.lbl_descripcionPregunta}" style="width:400px;"
|
|
resizable="true" sortBy="#{row.descripcion}">
|
|
<h:outputText value="#{row.descripcion}" />
|
|
</p:column>
|
|
|
|
<p:column headerText="#{msg_armas.tab_Respuestas}" styleClass="m-action-column" style="text-align: center; width:50px;">
|
|
<p:commandButton id="lovVerRespuestas" icon="ui-icon-document"
|
|
actionListener="#{preguntasParaEvaluacionesController.openRespuestasLov(row)}" process="@this" styleClass="m-lov-button" rendered="#{row.pk != null}">
|
|
<p:ajax event="dialogReturn" listener="#{preguntasParaEvaluacionesController.onReturnRespuestasLov}" update=":formTable:data-content,:formdialogo:pEdit" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
|
|
<p:column headerText="" styleClass="m-action-column" style="text-align: center; width:50px;">
|
|
<p:commandButton value="#{msg_general.btn_edit}" action="#{preguntasParaEvaluacionesController.edicion}" update=":formTable:data-content,:formdialogo:pEdit" oncomplete="PF('dialog').show()" styleClass="m-action-button" icon="ui-icon-pencil" process="@this, :formTable:data-content">
|
|
<f:setPropertyActionListener target="#{preguntasParaEvaluacionesController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{preguntasParaEvaluacionesController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{preguntasParaEvaluacionesController.newRow}" value="#{false}" />
|
|
</p:commandButton>
|
|
</p:column>
|
|
|
|
<p:column headerText="" styleClass="m-action-column" style="text-align: center; width:50px;">
|
|
<p:commandButton value="#{msg_general.btn_delete}"
|
|
update=":formTable:data-content" styleClass="m-action-button"
|
|
icon="ui-icon-trash" action="#{preguntasParaEvaluacionesController.remove()}"
|
|
process="@this, :formTable:data-content">
|
|
<f:setPropertyActionListener target="#{preguntasParaEvaluacionesController.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" />
|
|
<h:panelGrid id="pEdit" columns="3">
|
|
|
|
<p:outputLabel for="fpkTipoEvaluacionD" value="#{msg_armas.lbl_tipoEvaluacion}:"/>
|
|
<p:selectOneMenu id="fpkTipoEvaluacionD" value="#{preguntasParaEvaluacionesController.record.tipoevaluacion}"
|
|
style="width:250px" required="true" disabled="#{preguntasParaEvaluacionesController.esEdicionBln}" >
|
|
<p:ajax listener="#{preguntasParaEvaluacionesController.setNombreTipoEvaluacion()}" event="change" update="fpkNumeroD"/>
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lTipoEvaluacion}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkTipoEvaluacionD" />
|
|
|
|
<p:outputLabel for="fpkTipoPersonaD" value="#{msg_armas.lbl_tipoPersona}:" />
|
|
<p:selectOneMenu id="fpkTipoPersonaD" value="#{preguntasParaEvaluacionesController.record.tipopersona}"
|
|
style="width:250px" required="true" disabled="#{preguntasParaEvaluacionesController.esEdicionBln}" >
|
|
<p:ajax listener="#{preguntasParaEvaluacionesController.setNombreTipoPersona()}" event="change" update="fpkNumeroD"/>
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lTipoPersona}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkTipoPersonaD" />
|
|
|
|
<p:outputLabel for="fpkEstado" value="#{msg_armas.lbl_estado}:" />
|
|
<p:selectOneMenu id="fpkEstado" value="#{preguntasParaEvaluacionesController.record.estadopregunta}"
|
|
style="width:250px" required="true" disabled="#{!preguntasParaEvaluacionesController.existeRespuestasBln}" >
|
|
<p:ajax listener="#{preguntasParaEvaluacionesController.setEstadoPregunta()}" event="change" update="fpkNumeroD"/>
|
|
<f:selectItems value="#{preguntasParaEvaluacionesController.lEstados}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="fpkEstado" />
|
|
|
|
<p:outputLabel for="fpkNumeroD" value="#{msg_armas.lbl_numeroPregunta}:" />
|
|
<p:inputText id="fpkNumeroD" value="#{preguntasParaEvaluacionesController.record.numeropregunta!=null?preguntasParaEvaluacionesController.record.numeropregunta:''}" style="width: 50px;" disabled="true"/>
|
|
<p:message for="fpkNumeroD" />
|
|
|
|
<p:outputLabel for="fpkDescripcionD" value="#{msg_armas.lbl_descripcionPregunta}:" />
|
|
<p:inputTextarea id="fpkDescripcionD" rows="4" maxlength="300" required="true" value="#{preguntasParaEvaluacionesController.record.descripcion}" style="width: 300px; max-width:300px;height:70px;max-height:70px" autoResize="false"/>
|
|
<p:message for="fpkDescripcionD" />
|
|
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<maia:dialogControls
|
|
controller="#{preguntasParaEvaluacionesController}"
|
|
process=":formdialogo:pEdit"
|
|
update=":formdialogo:pEdit, :formTable:dt-table"
|
|
dialogWidgetVar="dialog" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
</ui:define>
|
|
</ui:composition> |