Hi,

When I am trying to export the contents from display table with decorator
class. The fields in the export file is showing the returned value in the
decorator class rather that displayed text in the table. What I have to
change if I want the text displayed in the table should be exported.

My table declaration is:

<display:table id="data" name="logisticreport"
        requestURI="/GetLogisticReport.do" pagesize="10" export="true" 
        decorator="com.scrabble.project.model.LogisticReportDecorator">
        
        <display:column property="hddBarcode" title="Barcode"
                sortable="true" style="text-align:center;" />
        <display:column property="clientname" title="Client"
                sortable="true" style="text-align:center;" />
        <display:column property="diskreturndate" title="HDD Return date"
                sortable="true" style="text-align:center;" />
        <display:column property="email" title="Email"/>
        
        <display:setProperty name="export.pdf" value="true" />
        <display:setProperty name="export.pdf.filename" 
value="LogisticReport.pdf"
/>
        <display:setProperty name="export.excel.filename"
value="LogisticReport.xls" />
        <display:setProperty name="export.xml" value="false" />
        <display:setProperty name="export.csv" value="false" />
        <display:setProperty name="export.xls" value="false" />
</display:table>


My decorator class is:

public class LogisticReportDecorator extends TableDecorator {
        public String getEmail(){
        
                LogisticReportVO lrVo = (LogisticReportVO)getCurrentRowObject();
                Integer ldays = lrVo.getLapseddays();
                String email =  lrVo.getEmail();
                if(ldays>90){
                        return "<html:link 
href=\"../GetLogisticReport.do?email=" + email +
"&amp;client="+lrVo.getClientname()+"&amp;ldays="+ldays+"&amp;projectid="+lrVo.getProjectid()+"&amp;drdate="+lrVo.getDiskreturndate()+"&amp;bcode="+lrVo.getHddBarcode()+"\">"+email+"</html:link>";
     }else{
         return email;
     }
}
}

Instead of html:link I used general anchor tag also but the result is same.

Result what I am getting is: (please see below if not the attachments also
if needed)

http://old.nabble.com/file/p31763232/LogisticReport.xls LogisticReport.xls 
http://old.nabble.com/file/p31763232/LogisticReport.pdf LogisticReport.pdf 

126        HyderabadClient        6/1/2011              a
href="../GetLogisticReport.do?email=raaj...@krishct.com&amp;client=HyderabadClient&amp;ldays=92&amp;projectid=6&amp;drdate=02/31/2011&amp;bcode=126">raaj...@krishct.com
/a

I want only this in the exported file

126                 HyderabadClient                6/1/2011               
raaj...@krishct.com       

Please help me in getting this.

Thanking you.

--raaja. g
-- 
View this message in context: 
http://old.nabble.com/Problem-with-export-in-display-tag-tp31763232p31763232.html
Sent from the DisplayTag - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to