• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Struts+displaytag+partialList+export PROBLEM

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm developing a web application using Struts and displaytag (for show/export information). Since the size of the resultList was too large, and I needed to improve the time, I tried to use the display:table attribute "partialList". The part of pagination has been solved and I successfully return partial results.

However, when I tried to export the information, I need to export the full list, so I check if exporting is executed, and in this case the sql query returns the full list, but what I see in the pdf generated file is the list page is being shown in the screen.

Here is my displaytag configuration:

****************************************
export.types=excel pdf csv

export.excel=true

export.pdf=true

export.xml=false

export.csv=true


export.pdf.class=es.treelogic.emulsa.utils.PDFEmulsaView

****************************************

And here is the code I have in my JSP

*****************************
<display:table name="sessionScope.tareas" id="tarea" pagesize="7" sort="external" cellspacing="1" cellpadding="2"
requestURI="../../action/ConsultasVehiculos?method=getActuacionesVehiculos" export="true" style="width: 100%;" partialList="true" size="consultasActuacionesForm.resultSize">
<display:caption media="pdf">
<bean:message key="consultasActuacionesVehiculos.tituloListado"/>
</display:caption>
<display:column title="Fecha" sortable="true" sortName="1" headerClass="td_tit" class="td_reg_con">
<fmt:formatDate value="${tarea.fechaEjecucion}" pattern="dd/MM/yyyy-HH:mm"/>
</display:column>
<display:column title="Desc. Tarea" sortable="true" sortName="60" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="tipoTarea.descripcion"/>
</display:column>
<display:column title="Ubicación" sortable="true" sortName="66" headerClass="td_tit" class="td_reg_con">
<logic:notEmpty name="tarea" property="elemento">
<bean:write name="tarea" property="elemento.descripcion"/>
</logic:notEmpty>
</display:column>
<display:column title="Número Vehículo" sortable="true" sortName="58" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="sesionTrabajo.dispositivo.instalacionDispositivo.vehiculo.vehiculoEmulsa.numeroVehiculoEmulsa"/>
</display:column>
<display:column title="Tipo de actividad" sortable="true" sortName="11" headerClass="td_tit" class="td_reg_con">
<c:if test="${tarea.actividad != null}">
<bean:write name="tarea" property="actividad.nombre"/>
</c:if>
</display:column>
<display:column title="Matrícula" sortable="true" sortName="50" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="sesionTrabajo.dispositivo.instalacionDispositivo.vehiculo.matricula"/>
</display:column>
<display:column title="IMEI Dispositivo" sortable="true" sortName="24" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="sesionTrabajo.dispositivo.imei"/>
</display:column>
<display:setProperty name="export.pdf.filename" value="TareasVehiculos.pdf"/>
<display:setProperty name="export.csv.filename" value="TareasVehiculos.csv"/>
<display:setProperty name="export.excel.filename" value="TareasVehiculos.xls"/>
<display:setProperty name="export.amount" value="list"/>
</display:table>
*****************************


Thanks in advance and sorry for my English
 
Normally trees don't drive trucks. Does this tiny ad have a license?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic