DataSource "sendExtraFields" Flag Causes an Error in ListGrids on Deletes

Hi,

I am seeing this odd behavior in RestDataSource data bound ListGrids, and I am hoping that someone can shed some light on it and help determine whether it’s bug in SmartGWT or something else. What’s happening is that when I call setSendExtraFields(false) on the DataSource and then try to delete a row in the grid(by clicking on the remove icon), I get the JavaScript error shown below in IE 8. If I don’t set this flag (sendExtraFields) to false, the error does not happen anymore. The other precondition for this is that the grid needs to have an icon field in it for this error to happen. We really prefer to set this flag to false in our application due to the increased amount of data that gets sent otherwise, and so we’d really appreciate an alternative workaround if there is one.

To help reproduce this behavior I have provided as an attachment, a standalone test case using a slightly modified version of the showcase’s Grid Cell Widgets and the RestDataSource samples. In order to observe this behavior start up this standalone app. In the grid that shows up in the page, make sure you select the UK row, and then click the delete button on that row. You will notice a browser Javascript error flag appearing in the left corner of the browser status bar. This is the error I am referring to. The grid is no longer responsive after that. Now go back to the standalone test case source code, and comment out this line:

            countryDS.setSendExtraFields(false);

and repeat the same experiment. The browser Javascript error does not happen anymore.

This has been tested with GWT2.3/SmartGWT2.5(final release) running in IE8 on Windows 7.

Please let me know if you need more info regarding this issue, or for running the test case.

Thanks very much for your time.
Mike

Debug console output:

00:00:40.373 [ERROR] 09:56:04.940:RDQ5:WARN:Log:Error: ‘’$81y’ is null or not an object’ in http://localhost:8080/GridTest/test.GridTest/sc/modules/ISC_Grids.js at line 1578
ListGrid.$81w(_1=>[HLayout ID:isc_HLayout_2], _2=>undef) ListGrid.updateRecordComponents() GridBody.redraw(_1=>false, _2=>undef, _3=>undef, _4=>undef) [c]Canvas.clearRedrawQueue() [c]Class.fireCallback(_1=>Obj, _2=>undef, _3=>Array[0], _4=>[Class Canvas], _5=>true) on [Class Timer] [c]Timer.$in(_1=>“$ir106”) anonymous()
“isc.Timer.$in(‘$ir106’)”
com.smartgwt.client.core.JsObject$SGWT_WARN: 09:56:04.940:RDQ5:WARN:Log:Error:
‘’$81y’ is null or not an object’
in http://localhost:8080/GridTest/test.GridTest/sc/modules/ISC_Grids.js
at line 1578

ListGrid.$81w(_1=>[HLayout ID:isc_HLayout_2], _2=>undef)
ListGrid.updateRecordComponents()
GridBody.redraw(_1=>false, _2=>undef, _3=>undef, _4=>undef)
[c]Canvas.clearRedrawQueue()
[c]Class.fireCallback(_1=>Obj, _2=>undef, _3=>Array[0], _4=>[Class Canvas], _5=>true) on [Class Timer]
[c]Timer.$in(_1=>"$ir106")
anonymous()
    "isc.Timer.$in('$ir106')"

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)

GridTest.java (5.25 KB)

GridTest.gwt.xml (1.17 KB)

Thanks for the information. We’ve fixed this issue in the 2.5 and 3.0 branch. The fix will be present in the next nightly build.