Version: v9.1p_2018-01-07/PowerEdition Deployment (built 2018-01-07)
Error: com.google.gwt.core.shared.SerializableThrowable: Exception caught: (TypeError) __gwt$exception: <skipped>: Cannot read property 'getOrCreateJsObj__Lcom_google_gwt_core_client_JavaScriptObject_2' of null
Code:
protected ListGrid mGrid; private ClickHandler getExportToFileHandler() { ClickHandler clickHandler = new ClickHandler() { public void onClick(ClickEvent event) { exportToFile(ExportTool.getExportProperties()); } }; return clickHandler; } protected void exportToFile(final DSRequest dsRequestProperties) { final ResultSet resultSet = mGrid.getResultSet(); resultSet.getRange(0, resultSet.getLength()); mHandler = resultSet.addDataArrivedHandler(new com.smartgwt.client.data.events.DataArrivedHandler() { @Override public void onDataArrived(com.smartgwt.client.data.events.DataArrivedEvent dataArrivedEvent) { mGrid.exportClientData(dsRequestProperties); removeHandler(); } }); mGrid.getResultSet().getRange(0, mGrid.getResultSet().getLength()); } public class ExportTool { public static DSRequest getExportProperties(){ DSRequest dsRequestProperties = new DSRequest(); dsRequestProperties.setExportAs((ExportFormat)EnumUtil.getEnum(ExportFormat.values(), "ooxml")); dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); return dsRequestProperties; } }
Comment