struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GTCulbreth <culbre...@verizon.net>
Subject Re: struts 2 display tag export problem
Date Mon, 29 Mar 2010 15:15:39 GMT

Hi Rakesh,

Did you get your answer to this question?

If not, are your export classes in your displayTag.properties file set.  If
you don't want anything special you would need:
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView 
export.pdf.class=org.displaytag.export.DefaultPdfExportView 

and so on.  Also these cannot be set using the setProperty statement

Hope this helps.



Rakesh K nair wrote:
> 
> 
> Hi
> 
> I am using following code for exporting all data from a table to excel and
> pdf. It works ok with the columns, but I canĀ“t export the footer and
> caption tag.
> 
> 
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
> <%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
> <jsp:directive.page import="org.displaytag.sample.*" />
> 
> 
> <display:table name="sessionScope.persons"  export="true" pagesize="2">
> 
> 	<display:setProperty name="export.excel.filename" value="Person
> List.xls"/>
>     <display:setProperty name="export.pdf.filename" value="Person
> List.pdf"/>
> 
>     <display:setProperty name="decorator.media.pdf"  
> value="org.displaytag.sample.decorators.ItextTotalWrapper" />
>     <display:setProperty name="decorator.media.excel"
> value="org.displaytag.sample.decorators.HssfTotalWrapper" />
> 
> 	<display:setProperty name="export.pdf" value="true" />
> 	<display:setProperty name="export.excel" value="true" />
> 	<display:setProperty name="export.csv" value="false" />
> 	<display:setProperty name="export.xml" value="false" />
> 
> 	<display:caption media="html">
>       <strong>A Caption</strong>
>     </display:caption>
> 	<display:caption media="excel pdf">A Caption</display:caption>
> 	
> 	<display:footer media="html">
>       <tr>
>         <td colspan="4"><strong>Sample footer</strong></td>
>       </tr>
>     </display:footer>
> 	<display:footer media="excel pdf">Sample footer</display:footer>
> 	
> 	<display:column property="id" title="ID" />
> 	<display:column property="name"  title="NAME"/>
> 	
> 	
> </display:table>
> 
> 
> Expecting your kind interaction
> 
> Thanks in advance
> 
> Rakesh
> 

-- 
View this message in context: http://old.nabble.com/struts-2-display-tag-export-problem-tp27819962p28070772.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message