File Export: setExportHeader() not working

Hello,

Just a simple problem I’m having. I can export csv/xml files as outlined in the showcase. However when I try try to add a header or footer to the exported file it doesn’t do anything? Can anyone help or suggest a workaround for this?

GWT 2.0
SmartGWT 2.0
SmartGWTEE 1.2.1

String exportAs = (String) exportForm.getField("exportType").getValue();  
DSRequest dsRequestProperties = new DSRequest(); 
String header = "---------HEADER--------";
String footer = "---------FOOTER--------";
dsRequestProperties.setExportHeader(header); // doesn't work
dsRequestProperties.setExportFooter(footer);  // doesn't work

dsRequestProperties.setExportFields(
            new String[]{"name", "s_number", "rating", "delta"});

dsRequestProperties.setExportDisplay(showInWindow ? 
                     ExportDisplay.WINDOW : ExportDisplay.DOWNLOAD);  

exportList.exportData(dsRequestProperties);

Could you elaborate on “doesn’t work”? :slight_smile:

No header or footer string (“---------HEADER--------” or “---------FOOTER--------”) appears in the exported csv or xml file

We did find and correct an issue where the footer could be written out the same as the header, although not an issue as you describe. Try the latest nightly to verify the fix.

It works now with the latest build - both header and footer appear in the exported file - cheers :slight_smile: