I love the tag -- its great! I'm using it with my Struts/Tiles application and it works without any problems.
One thing I'd like to do, but not sure how to go about it -- is when using the export feature how do I set the filename to something? (i.e. foobar.xls instead of mypage.jsp.xls as the default)
Thanks,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just wondering whether you were able to figure this out. I need to change the filename in my application, would be good if you've done it and can help.
Thanks,
Nisha
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did exactly what you said and it does not work for me at all. Instead of using the filename specified in the setProperty tag (data.xls or data.csv), it uses the value in the requestURI. I can not figure out it at all. Please help!
here is my jsp:
<display:table name="${result}" id="result" class="ApptableDisplayTag" export="true" requestURI="/searchResults.do" pagesize="2">
<displaytag:setProperty name="export.excel.filename" value="data.xls" />
<displaytag:setProperty name="export.csv.filename" value="data.csv" />
<display:caption>This is the table caption</display:caption>
<display:column sortable="false" title="Keys of Defective Records"> <c:out value="${result}"/></display:column>
</display:table>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I love the tag -- its great! I'm using it with my Struts/Tiles application and it works without any problems.
One thing I'd like to do, but not sure how to go about it -- is when using the export feature how do I set the filename to something? (i.e. foobar.xls instead of mypage.jsp.xls as the default)
Thanks,
Michael
Hi Michael,
Just wondering whether you were able to figure this out. I need to change the filename in my application, would be good if you've done it and can help.
Thanks,
Nisha
Please help me . i also want to change the file name
No, I haven't seen anyone respond and I tried doing what the docs said...
Sorry!
No worries. Thanks anyways.
Hi.
You can change the value in the "displaytag.properties" file and/or in you JSP.
If you want the same name for all your tables, set the "export.excel.filename" property in the "displaytag.properties" file.
Ex:
export.excel.filename=my_file_name.xls
If you want a specific name by table, then change it in the JSP, using the <display:setProperty .../> tag.
Ex:
<display:table
onclick="produitInitAction.do" mode="co"
name="alpha" defaultsort="1" sort="list" defaultorder="descending"
pagesize="15" export="true" requestURI="listeProduitValiderAction.do"
decorator="fr.generali.fede.icone.web.displaytag.TableDecoratorIcone">
</display:table>
You can change both: one default name for all tables and one specific name when needed.
Th.
I did exactly what you said and it does not work for me at all. Instead of using the filename specified in the setProperty tag (data.xls or data.csv), it uses the value in the requestURI. I can not figure out it at all. Please help!
here is my jsp:
<display:table name="${result}" id="result" class="ApptableDisplayTag" export="true" requestURI="/searchResults.do" pagesize="2">
<displaytag:setProperty name="export.excel.filename" value="data.xls" />
<displaytag:setProperty name="export.csv.filename" value="data.csv" />
<display:caption>This is the table caption</display:caption>
<display:column sortable="false" title="Keys of Defective Records"> <c:out value="${result}"/></display:column>
</display:table>