• 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Struts+displaytag+partialList+export PROBLEM

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







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: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 title="Desc. Tarea" sortable="true" sortName="60" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="tipoTarea.descripcion"/>
<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"/>
<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 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"/>
<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 title="IMEI Dispositivo" sortable="true" sortName="24" headerClass="td_tit" class="td_reg_con">
<bean:write name="tarea" property="sesionTrabajo.dispositivo.imei"/>
<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"/>

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
    Bookmark Topic Watch Topic
  • New Topic