Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    setExportFieldTitles() not working

    setExportFieldTitles() seems not to work. I still get the "name" title in the excel file, while I should get "name abc abc".
    This was working in previous versions.
    Using smartgwt 6.0p 06.04.16 power.

    Code:
    public void onModuleLoad() {
    
            final VLayout vlayout = new VLayout();
    
            final ListGrid lg = new ListGrid();
            ListGridField nameField = new ListGridField("f_name", "name");
            lg.setFields(nameField);
            lg.setDataSource("schueler_table");
            lg.fetchData();
    
            IButton but = new IButton("click me");
            but.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    DSRequest properties = new DSRequest();
                    properties.setExportFilename("Export");
                    properties.setExportAs(ExportFormat.XLS);
                    properties.setOperationId("fetch_test");
                    properties.setExportDisplay(ExportDisplay.DOWNLOAD);
                    lg.exportData(properties);
                }
            });
            
            vlayout.addMember(lg);
            vlayout.addMember(but);
            vlayout.setWidth100();
            vlayout.setHeight100();
            vlayout.draw();
    
        }
    schueler_table.ds.xml:
    Code:
    <DataSource ID="schueler_table">
    
        <fields>
            <field name="f_name" type="text" />
        </fields>
    
        <operationBindings>
    
            <operationBinding operationType="fetch" operationId="fetch_test">
                <serverObject className="de.mks_infofabrik.kids.server.test.TestingDMI"
                    methodName="testMethod" />
            </operationBinding>
    
        </operationBindings>
    
    
    </DataSource>
    TestingDMI:
    Code:
    public class TestingDMI {
    
        private static final Logger LOG = Utils.getLogger(TestingDMI.class);
    
        public DSResponse testMethod(DSRequest dsRequest) throws Exception {
    
            LOG.info("TestingDMI: ExecuteMethod()");
    
            Map<String,Object> originalTitles = dsRequest.getExportFieldTitles();
    
            originalTitles.put("f_name", "name abc abc");
            
            dsRequest.setExportFieldTitles(originalTitles);
    
            return dsRequest.execute();
        }
    }

    #2
    Isomorphic were you able to reproduce ?

    Comment


      #3
      Issue is reproduced and we are working on it. We'll follow up when it is fixed.

      Comment


        #4
        This is fixed and will be available for download in nightly builds since Apr 14 (today).

        Comment

        Working...
        X