• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Struts+displaytag+partialList+export PROBLEM

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!