Hello,
In smartGWT 2.5 I used this way to export some results and everything was fine.
final DSRequest exportRequest = new DSRequest();
exportRequest.setExportAs(ExportFormat.CSV);
exportRequest.setExportDisplay(ExportDisplay.DOWNLOAD);
exportRequest.setExportDelimiter(";");
DataSource ds = DataSource.get("...");
Criteria criteria = new Criteria(); criteria.addCriteria(...);
ds.exportData(criteria, exportRequest);
Now in smartGWT 3.0 I tried to change a little bit because ds.exportData(criteria, exportRequest);
is not available anymore, so I tried :
ds.exportData(criteria, exportRequest, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
SC.say("Here need to start download");
}
});
But this code is not executed and I received the exception:
java.lang.ClassCastException: persistence.entities.ExportEntity cannot be cast to java.util.Map.
I don't understand what I need to change here, because in 2.5 version this code works very good.
Please tell me what need to do to be able to run the export in 3.0 version.
Best regards,
Marius
In smartGWT 2.5 I used this way to export some results and everything was fine.
final DSRequest exportRequest = new DSRequest();
exportRequest.setExportAs(ExportFormat.CSV);
exportRequest.setExportDisplay(ExportDisplay.DOWNLOAD);
exportRequest.setExportDelimiter(";");
DataSource ds = DataSource.get("...");
Criteria criteria = new Criteria(); criteria.addCriteria(...);
ds.exportData(criteria, exportRequest);
Now in smartGWT 3.0 I tried to change a little bit because ds.exportData(criteria, exportRequest);
is not available anymore, so I tried :
ds.exportData(criteria, exportRequest, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
SC.say("Here need to start download");
}
});
But this code is not executed and I received the exception:
java.lang.ClassCastException: persistence.entities.ExportEntity cannot be cast to java.util.Map.
I don't understand what I need to change here, because in 2.5 version this code works very good.
Please tell me what need to do to be able to run the export in 3.0 version.
Best regards,
Marius
Comment