Files
gateway-dbc-fx/gnpdev/dbcfxgo/web/res/content/visualizzaReportContent.jsp
2024-05-09 17:40:24 +02:00

476 lines
39 KiB
Plaintext

<%@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<table valign="top" cellspacing="0" cellpadding="0" WIDTH="100%"
align="center">
<tr width="100%" align="center">
<td>
<h:form id="populateForm">
<table valign="top" cellspacing="0" cellpadding="0" WIDTH="100%"
align="center">
<tr width="100%" align="center">
<td>
<table valign="top" cellspacing="0" cellpadding="0" WIDTH="100%"
align="center">
<tr width="100%" align="center">
<td>
<rich:panel>
<f:facet name="header">
<h:outputText value="Ricerca Report" />
</f:facet>
<h:panelGrid columns="3" align="center" width="90%">
<h:column>
<h:outputLabel for="tipoReport"
style="color:black;font-weight:bold;"
value=" Seleziona il report da visualizzare: " />
<t:selectOneMenu id="tipoReport" value="#{report.reportID}" style="width:220px;">
<a4j:support event="onchange"
actionListener="#{report.clearReportContent}"
reRender="panelGridRisultato, labelNumRic , panelGridFilter"
immediate="true" onsubmit="Richfaces.showModalPanel('loadingPanel');"
oncomplete="Richfaces.hideModalPanel('loadingPanel');" />
<t:selectItems value="#{report.reportTypes}" var="item"
itemLabel="#{item.descr}" itemValue="#{item.id}"></t:selectItems>
</t:selectOneMenu>
</h:column>
<h:column>
<h:outputLabel for="filtroProcesso"
value=" Seleziona il processo: "
style="color:black;font-weight:bold;" />
<t:selectOneMenu id="filtroProcesso"
value="#{report.processID}">
<t:selectItems value="#{report.processTypes}"
var="itemProcess" itemLabel="#{itemProcess.descr}"
itemValue="#{itemProcess.id}"></t:selectItems>
</t:selectOneMenu>
</h:column>
<h:column>
<h:panelGrid columns="1" styleClass="">
<h:panelGroup>
<h:outputLabel for="dataInserimento"
value=" Data report: " styleClass=""
style="color:black;font-weight:bold;" />
<rich:calendar id="dataInserimento" popup="true"
direction="bottom-left"
value="#{report.dataInserimento}"
datePattern="dd/MM/yyyy" enableManualInput="false"
required="true" />
</h:panelGroup>
<rich:message for="dataInserimento"
style="color:red;font-weight:bold;" />
</h:panelGrid>
</h:column>
</h:panelGrid>
</rich:panel>
</td>
</tr>
<tr style="background-color: #CCCCCC;">
<td>
<rich:panel>
<h:panelGrid columns="3" style="background-color: #CCCCCC;"
rowClasses="buttonReport" align="center">
<h:column>
<a4j:commandButton id="VisualizzaButtonId"
action="#{report.populate}" type="submit"
value="Visualizza/Filtra"
reRender="listaRic, labelNumRic, updateGrid,panelGridFilter,FiltraCommand, internalGrid"
onclick="Richfaces.showModalPanel('loadingPanel');"
oncomplete="Richfaces.hideModalPanel('loadingPanel');" />
</h:column>
<h:column>
<t:commandButton id="DownloadButtonId2"
action="#{report.download}" type="submit" value="Download"/>
</h:column>
</h:panelGrid>
</rich:panel>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<h:panelGrid columns="1" id="labelNumRic">
<h:outputText value="Record trovati : #{report.resultSize}"
rendered="#{(report.resultSize gt 0)}"
style="color:black;font-weight:bold;" />
<h:outputText value="Nessun record trovato"
rendered="#{(report.resultSize le 0) and (report.reportID ne 6)}"
style="color:black;font-weight:bold;" />
<h:outputText value="Report disponibile solo per i processi di Del.35"
rendered="#{(report.resultSize le 0) and (report.reportID eq 6) and (report.processID ne 7) and (report.processID ne 8) and (report.processID ne 9) and (report.processID ne 10)}"
style="color:black;font-weight:bold;" />
<h:outputText value="Nessun record trovato"
rendered="#{(report.resultSize le 0) and (report.reportID eq 6) and ((report.processID eq 7) or (report.processID eq 8) or (report.processID eq 9) or (report.processID eq 10) )}"
style="color:black;font-weight:bold;" />
</h:panelGrid>
</td>
</tr>
<tr>
<td>
<rich:separator lineType="solid" width="100%" />
<rich:modalPanel shadowDepth="1" shadowOpacity="4"
styleClass="rich-mpnl-shadow"
style="border:2 solid;border-color:#AAAAFF;" width="252"
height="232" id="loadingPanel" autosized="true" zindex="100"
left="500" top="150">
<h:graphicImage alt="loading..." width="250" height="230"
style="align:center;"
value="/resources/images/loading_aqua.gif" />
</rich:modalPanel>
</td>
</tr>
<!-- FILTRI -->
<tr width="100%" align="center">
<td>
<table valign="top" cellspacing="0" cellpadding="0" WIDTH="100%"
align="center">
<tr width="100%" align="center">
<td align="center">
<h:panelGrid columns="4" id="panelGridFilter" cellpadding="0"
border="0" cellspacing="0" width="100%" headerClass="dr-pnl-h rich-panel-header" >
<t:dataList value="#{report.filterList}" var="itemFilter">
<rich:column id="internalColumn"
rendered="#{(itemFilter.label ne null) }">
<h:panelGrid columns="1" id="internalGrid" width="100%"
align="left" cellpadding="0" cellspacing="0"
style="text-align: center;" rowClasses="filterReportRow">
<rich:column>
<h:outputLabel value="#{itemFilter.label}"
style="color:black;font-weight:bold;" />
</rich:column>
<rich:column>
<t:selectOneMenu value="#{itemFilter.selectedValue}"
rendered="#{(itemFilter.type.filterType eq 3)}">
<f:selectItem itemLabel="Tutti" itemValue="-1" />
<t:selectItems value="#{itemFilter.valueBindingLov}"
var="item" itemLabel="#{item.descr}"
itemValue="#{item.name}" />
</t:selectOneMenu>
<rich:calendar popup="true" direction="bottom-left"
value="#{itemFilter.selectedValue}"
datePattern="dd/MM/yyyy" enableManualInput="false"
rendered="#{(itemFilter.type.filterType ne 3)}" />
</rich:column>
</h:panelGrid>
</rich:column>
</t:dataList>
</h:panelGrid>
</td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</td>
</tr>
<!-- FINE FILTRI -->
<tr width="100%" align="center">
<td>
<h:form id="updateForm">
<table valign="top" cellspacing="0" cellpadding="0" WIDTH="100%"
align="center">
<tr width="100%" align="center">
<td align="center">
<a4j:outputPanel id="panelListaRichieste" ajaxRendered="true"
style="align:center;">
<!-- risultato -->
<h:panelGrid id="panelGridRisultato" columns="1"
rendered="#{(report.resultSize gt 0)}" width="100%">
<rich:dataTable value="#{report.dynamicList}" var="item"
width="100%" id="listaRic" rows="15" columnClasses="col"
rowKeyVar="rowKey">
<f:facet name="header">
<rich:columnGroup>
<rich:column rendered="#{report.headerSize ge 1}">
<h:outputText value="#{report.dynamicHeader[0]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 2}">
<h:outputText value="#{report.dynamicHeader[1]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 3}">
<h:outputText value="#{report.dynamicHeader[2]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 4}">
<h:outputText value="#{report.dynamicHeader[3]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 5}">
<h:outputText value="#{report.dynamicHeader[4]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 6}">
<h:outputText value="#{report.dynamicHeader[5]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 7}">
<h:outputText value="#{report.dynamicHeader[6]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 8}">
<h:outputText value="#{report.dynamicHeader[7]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 9}">
<h:outputText value="#{report.dynamicHeader[8]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 10}">
<h:outputText value="#{report.dynamicHeader[9]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 11}">
<h:outputText value="#{report.dynamicHeader[10]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 12}">
<h:outputText value="#{report.dynamicHeader[11]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 13}">
<h:outputText value="#{report.dynamicHeader[12]}" />
</rich:column>
<rich:column rendered="#{report.headerSize ge 14}">
<h:outputText value="#{report.dynamicHeader[13]}" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column rendered="#{report.headerSize ge 1}">
<h:outputText value="#{item[0]}"
rendered="#{(report.dynamicHeader[0] ne 'Sollecito 1') and
(report.dynamicHeader[0] ne 'Sollecito2') and (report.dynamicHeader[0] ne 'Sollecito 3')}" />
<h:inputText value="#{item[0]}"
rendered="#{((report.dynamicHeader[0] eq 'Sollecito 1') or
(report.dynamicHeader[0] eq 'Sollecito 2') or (report.dynamicHeader[0] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 2}">
<h:outputText value="#{item[1]}"
rendered="#{(report.dynamicHeader[1] ne 'Sollecito 1') and
(report.dynamicHeader[1] ne 'Sollecito 2') and (report.dynamicHeader[1] ne 'Sollecito 3')}" />
<h:inputText value="#{item[1]}"
rendered="#{((report.dynamicHeader[1] eq 'Sollecito 1') or
(report.dynamicHeader[1] eq 'Sollecito 2') or (report.dynamicHeader[1] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 3}">
<h:outputText value="#{item[2]}"
rendered="#{(report.dynamicHeader[2] ne 'Sollecito 1') and
(report.dynamicHeader[2] ne 'Sollecito 2') and (report.dynamicHeader[2] ne 'Sollecito 3')}" />
<h:inputText value="#{item[2]}"
rendered="#{((report.dynamicHeader[2] eq 'Sollecito 1') or
(report.dynamicHeader[2] eq 'Sollecito 2') or (report.dynamicHeader[2] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 4}">
<h:outputText value="#{item[3]}"
rendered="#{(report.dynamicHeader[3] ne 'Sollecito 1') and
(report.dynamicHeader[3] ne 'Sollecito 2') and (report.dynamicHeader[3] ne 'Sollecito 3')}" />
<h:inputText value="#{item[3]}"
rendered="#{((report.dynamicHeader[3] eq 'Sollecito 1') or
(report.dynamicHeader[3] eq 'Sollecito 2') or (report.dynamicHeader[3] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 5}">
<h:outputText value="#{item[4]}"
rendered="#{(report.dynamicHeader[4] ne 'Sollecito 1') and
(report.dynamicHeader[4] ne 'Sollecito 2') and (report.dynamicHeader[4] ne 'Sollecito 3')}" />
<h:inputText value="#{item[4]}"
rendered="#{((report.dynamicHeader[4] eq 'Sollecito 1') or
(report.dynamicHeader[4] eq 'Sollecito 2') or (report.dynamicHeader[4] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 6}">
<h:outputText value="#{item[5]}"
rendered="#{(report.dynamicHeader[5] ne 'Sollecito 1') and
(report.dynamicHeader[5] ne 'Sollecito 2') and (report.dynamicHeader[5] ne 'Sollecito 3')}" />
<h:inputText value="#{item[5]}"
rendered="#{((report.dynamicHeader[5] eq 'Sollecito 1') or
(report.dynamicHeader[5] eq 'Sollecito 2') or (report.dynamicHeader[5] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 7}">
<h:outputText value="#{item[6]}"
rendered="#{(report.dynamicHeader[6] ne 'Sollecito 1') and
(report.dynamicHeader[6] ne 'Sollecito 2') and (report.dynamicHeader[6] ne 'Sollecito 3')}" />
<h:inputText value="#{item[6]}"
rendered="#{((report.dynamicHeader[6] eq 'Sollecito 1') or
(report.dynamicHeader[6] eq 'Sollecito 2') or (report.dynamicHeader[6] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 8}">
<h:outputText value="#{item[7]}"
rendered="#{(report.dynamicHeader[7] ne 'Sollecito 1') and
(report.dynamicHeader[7] ne 'Sollecito 2') and (report.dynamicHeader[7] ne 'Sollecito 3')}" />
<h:inputText value="#{item[7]}"
rendered="#{((report.dynamicHeader[7] eq 'Sollecito 1') or
(report.dynamicHeader[7] eq 'Sollecito 2') or (report.dynamicHeader[7] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 9}">
<h:outputText value="#{item[8]}"
rendered="#{(report.dynamicHeader[8] ne 'Sollecito 1') and
(report.dynamicHeader[8] ne 'Sollecito 2') and (report.dynamicHeader[8] ne 'Sollecito 3')}" />
<h:inputText value="#{item[8]}"
rendered="#{((report.dynamicHeader[8] eq 'Sollecito 1') or
(report.dynamicHeader[8] eq 'Sollecito 2') or (report.dynamicHeader[8] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 10}">
<h:outputText value="#{item[9]}"
rendered="#{(report.dynamicHeader[9] ne 'Sollecito 1') and
(report.dynamicHeader[9] ne 'Sollecito 2') and (report.dynamicHeader[9] ne 'Sollecito 3')}" />
<h:inputText value="#{item[9]}"
rendered="#{((report.dynamicHeader[9] eq 'Sollecito 1') or
(report.dynamicHeader[9] eq 'Sollecito 2') or (report.dynamicHeader[9] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 11}">
<h:outputText value="#{item[10]}"
rendered="#{(report.dynamicHeader[10] ne 'Sollecito 1') and
(report.dynamicHeader[10] ne 'Sollecito 2') and (report.dynamicHeader[10] ne 'Sollecito 3')}" />
<h:inputText value="#{item[10]}"
rendered="#{((report.dynamicHeader[10] eq 'Sollecito 1') or
(report.dynamicHeader[10] eq 'Sollecito 2') or (report.dynamicHeader[10] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 12}">
<h:outputText value="#{item[11]}"
rendered="#{(report.dynamicHeader[11] ne 'Sollecito 1') and
(report.dynamicHeader[11] ne 'Sollecito 2') and (report.dynamicHeader[11] ne 'Sollecito 3')}" />
<h:inputText value="#{item[11]}"
rendered="#{((report.dynamicHeader[11] eq 'Sollecito 1') or
(report.dynamicHeader[11] eq 'Sollecito 2') or (report.dynamicHeader[11] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 13}">
<h:outputText value="#{item[12]}"
rendered="#{(report.dynamicHeader[12] ne 'Sollecito 1') and
(report.dynamicHeader[12] ne 'Sollecito 2') and (report.dynamicHeader[12] ne 'Sollecito 3')}" />
<h:inputText value="#{item[12]}"
rendered="#{((report.dynamicHeader[12] eq 'Sollecito 1') or
(report.dynamicHeader[12] eq 'Sollecito 2') or (report.dynamicHeader[12] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<rich:column rendered="#{report.headerSize ge 14}">
<h:outputText value="#{item[13]}"
rendered="#{(report.dynamicHeader[13] ne 'Sollecito 1') and
(report.dynamicHeader[13] ne 'Sollecito 2') and (report.dynamicHeader[13] ne 'Sollecito 3')}" />
<h:inputText value="#{item[13]}"
rendered="#{((report.dynamicHeader[13] eq 'Sollecito 1') or
(report.dynamicHeader[13] eq 'Sollecito 2') or (report.dynamicHeader[13] eq 'Sollecito 3')) and (user.codiceProfilo eq 'GG')}">
<a4j:support event="onchange"
actionListener="#{report.addSollecitoToUpdate}">
<a4j:actionparam value="#{rowKey}"
assignTo="#{report.index}" name="#{rowKey}index"></a4j:actionparam>
</a4j:support>
</h:inputText>
</rich:column>
<f:facet name="footer">
<rich:datascroller maxPages="15" fastStep="16"
renderIfSinglePage="false" />
</f:facet>
</rich:dataTable>
</h:panelGrid>
</a4j:outputPanel>
</td>
</tr>
<!-- fine risultato -->
<tr>
<td>
<a4j:outputPanel id="panelUpdateCommand" ajaxRendered="true"
style="align:center;">
<h:panelGrid columns="1" styleClass="button" width="100%"
id="updateGrid" rowClasses="buttonReport"
style="background-color: #CCCCCC;">
<rich:separator lineType="solid" id="updateSeparator" rendered="#{(report.updating) and (user.codiceProfilo eq 'GG')}"/>
<a4j:commandButton id="updateCommand" value="Update"
rendered="#{(report.updating) and (user.codiceProfilo eq 'GG')}"
action="#{report.updateRows}"
onclick="Richfaces.showModalPanel('loadingPanel');"
oncomplete="Richfaces.hideModalPanel('loadingPanel');" />
</h:panelGrid>
</a4j:outputPanel>
</td>
</tr>
</td>
</tr>
</table>
</h:form>
</td>
</tr>
</table>