aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts+displaytag+partialList+export PROBLEM" Watch "Struts+displaytag+partialList+export PROBLEM" New topic
Author

Struts+displaytag+partialList+export PROBLEM

Ana Castanon
Greenhorn

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

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts+displaytag+partialList+export PROBLEM