Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DisplayTag: Export to csv with headers

 
karan chandok
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am able to export my jsp page table data into csv file.
But the problem is I want to export headers also in first row.Please suggest how to do that.

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you exporting the data? What particular problem are you facing in adding an extra first line to the CSV file?
 
karan chandok
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using display tag like this.
<display:table style="margin:10px;margin-top:15px " id="alternatecolor" class="altrowstable" name="summaryList2" pagesize="8" export="true" requestURI="${actionName}" >
<display:column property="operator" title="Operator" sortable="true"/>
<display:setProperty name="export.csv" value="true" />


But problem is it is not exporting column names.Please suggest how can I do that.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a property setting for that; see http://www.displaytag.org/1.2/configuration.html for details.
 
karan chandok
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ulf Dittmer

It solves my problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic