• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

DisplayTag Export Question?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fellas,

Im stucked with display tag export because of jstl and html words exportion.
My codes are here:

JSP

<display:table uid="row" name="messages" class="borderAll"
pagesize="10" export="true" requestURI="">
<display:setProperty name="page" value="${row.id}" />

<display:column property="message" title="Message" class="nowrap"
sortable="true" maxLength="25">
<s:textfield name="#attr.row.mesage"></s:textfield>
</display:column>
<display:column title="Confirmed" class="nowrap" sortable="true">
<s:checkbox name="#attr.row.confirmed" disabled="true" />
</display:column>
<display:column property="createTime" title="Create Time"
sortable="true" class="nowrap"
format="{0,date,yyyy/MM/dd HH:mm:ss}" />
<display:column property="confirmTime" title="Confirm Time"
sortable="true" format="{0,date,yyyy/MM/dd HH:mm:ss}"
class="nowrap" />
<display:column property="scheduleTime" title="Schedule Time"
sortable="true" class="nowrap"
format="{0,date,yyyy/MM/dd HH:mm:ss}" />
<display:column property="service.serviceName" title="Service Name"
sortable="true" class="nowrap" />
<display:column title="Message Status" class="nowrap"
sortable="true">
<s:if test="#attr.row.messageStatus==0">
<s:text name="WAITING" />
</s:if>
<s:if test="#attr.row.messageStatus==1">
<s:text name="SENDING" />
</s:if>
<s:if test="#attr.row.messageStatus==2">
<s:text name="SENT" />
</s:if>
</display:column>
<display:column class="nowrap">
<table>
<tr>
<td><s:if test="!#attr.row.confirmed">
<s:url id="update" action="setUpForInsertOrUpdateMessages">
<s:param name="message.id" value="#attr.row.id" />
</s:url>
<s:a href="%{update}">Edit</s:a>
</s:if>
</td>
<td><s:if test="!#attr.row.confirmed">
<s:url id="delete" action="deleteMessage">
<s:param name="message.id" value="#attr.row.id" />
</s:url>
<s:a href="%{delete}">Delete</s:a>
</s:if>
</td>
<td><s:if test="!#attr.row.confirmed">
<s:url id="confirm" action="confirmMessage">
<s:param name="message.id" value="#attr.row.id" />
</s:url>
<s:a href="%{confirm}">Confirm</s:a>
</s:if>
</td>
</tr>
</table>
</display:column>
</display:table>

Properties

#sort.behavior=list
#sort.amount=list
#basic.empty.showtable=true
#basic.msg.empty_list=No results matched your criteria.
#paging.banner.placement=top
#paging.banner.onepage=<span class="pagelinks"></span>
export.types=csv excel xml pdf rtf
export.excel=true
export.csv=true
export.xml=true
export.pdf=true
export.rtf=true
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
export.pdf.class=org.displaytag.export.DefaultPdfExportView
export.rtf.class=org.displaytag.export.DefaultRtfExportView
# if set, file is downloaded instead of opened in the browser window
#export.[mymedia].filename=

Sample output (XML):
<table><row><column>090601AE02056A0045C60C037300010373000101</column><column>
<input type="checkbox" name="#attr.row.confirmed" value="true" checked="checked" disabled="disabled" id="getAllMessages_#attr_row_confirmed"/>
<input type="hidden" id="__checkbox_getAllMessages_#attr_row_confirmed" name="__checkbox_#attr.row.confirmed" value="true" disabled="disabled" />
</column><column>2011/06/06 16:58:25</column><column>2011/06/07 10:34:40</column><column>2011/06/06 16:58:21</column><column>TEKNOMOBIL</column><column>

WAITING



</column><column>
<table>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</column></row>
</table>

i expect output as

<table><row><column>090601AE02056A0045C60C037300010373000101</column><column>TRUE<column>2011/06/06 16:58:25</column><column>2011/06/07 10:34:40</column><column>2011/06/06 16:58:21</column><column>TEKNOMOBIL</column><column>

WAITING



</column><column>
<table>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</column></row>
</table>

Or may i export only selected columns ?
Regards,
Mehmet.
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic