I am using SmartGWT 4.1-d20131117.
I am attempting to refresh a ListGrid by following the recommended code at https://isomorphic.atlassian.net/wiki/pages/viewpage.action?pageId=524941.
Here is the code from the Isomorphic Wiki page:
This code fails with an exception on the line containing listGrid.getResultSet().getResultSize()
Here is the stack trace
If I remove all the code except "getResultSet().getResultSize();" I get the same failure/exception.
I am attempting to refresh a ListGrid by following the recommended code at https://isomorphic.atlassian.net/wiki/pages/viewpage.action?pageId=524941.
Here is the code from the Isomorphic Wiki page:
Code:
private void onRefresh() { DataSource dataSource = listGrid.getDataSource(); Criteria criteria = listGrid.getCriteria(); Integer[] visibleRows = listGrid.getVisibleRows(); Integer startRow = 0; Integer endRow = (visibleRows[1] + listGrid.getResultSet().getResultSize()); DSRequest request = new DSRequest(); request.setStartRow(startRow); request.setEndRow(endRow); request.setSortBy(listGrid.getSort()); dataSource.fetchData(criteria, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { DataSource dataSource = listGrid.getDataSource(); ResultSet resultSet = new ResultSet(dataSource); resultSet.setInitialLength(response.getTotalRows()); resultSet.setInitialData(response.getData()); resultSet.setInitialSort(listGrid.getSort()); resultSet.setCriteria(listgrid.getCriteria()); listGrid.setData(resultSet); } }, request); }
Here is the stack trace
Code:
com.google.gwt.dev.shell.HostedModeException: invoke arguments: JS value of type JavaScript object(8659), expected int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.core.BaseClass.getAttributeAsInt(BaseClass.java) at com.smartgwt.client.data.ResultSet.getResultSize(ResultSet.java:310) at com.cedarcone.Orchestrate.client.viewer.tabset.classifier.StatusListGrid.refreshDisplay(StatusListGrid.java:182) at com.cedarcone.Orchestrate.client.viewer.tabset.classifier.StatusListGrid.access$1(StatusListGrid.java:180) at com.cedarcone.Orchestrate.client.viewer.tabset.classifier.StatusListGrid$2.run(StatusListGrid.java:65) at com.google.gwt.user.client.Timer.fire(Timer.java:149) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:27
Comment