File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts+displaytag+partialList+export PROBLEM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts+displaytag+partialList+export PROBLEM" Watch "Struts+displaytag+partialList+export PROBLEM" New topic

Struts+displaytag+partialList+export PROBLEM

Ana Castanon

Joined: Jan 12, 2011
Posts: 1
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
I agree. Here's the link:
subject: Struts+displaytag+partialList+export PROBLEM
Similar Threads
Display Table
Error while Exporting the display tag table content as a .pdf
problem with display table pagination and sorting
Pagination in Struts2
problem with display tag