Hi,
I've encountered an bug when using ListGrid:setDeferRemoval(). The standalone test case below produces the error in both IE8 and FF17.
Steps to reproduce: Remove Canada. Remove USA. Click Save.
Interestingly, if USA is removed first and then Canada, the save is fine. Also, if only one row is removed the save is fine as well.
I'm using SmartClient Version: v8.3p_2013-02-15/LGPL Development Only (built 2013-02-15).
Developer console stack trace:
Thanks
I've encountered an bug when using ListGrid:setDeferRemoval(). The standalone test case below produces the error in both IE8 and FF17.
Steps to reproduce: Remove Canada. Remove USA. Click Save.
Interestingly, if USA is removed first and then Canada, the save is fine. Also, if only one row is removed the save is fine as well.
I'm using SmartClient Version: v8.3p_2013-02-15/LGPL Development Only (built 2013-02-15).
Developer console stack trace:
Code:
08:53:39.981:MUP0:INFO:gridEdit:isc_ListGrid_0:Saving newValues 'null' 08:53:40.074:MUP0:WARN:Log:Error: ''undefined' is null or not an object' in http://127.0.0.1:8888/bsa_gwt_webapp/sc/modules/ISC_Grids.js at line 1672 ListGrid.$336(_1=>Obj, _2=>"this.$335('',rowNum,0,colNum,editComplet..."[57]) ListGrid.saveEditedValues(_1=>1, _2=>-1, _3=>Obj, _4=>undef, _5=>undef, _6=>"programmatic", _7=>"this.$335('',rowNum,0,colNum,editComplet..."[57]) ListGrid.saveEdits(_1=>"programmatic", _2=>"this.$335('',rowNum,0,colNum,editComplet..."[57], _3=>1, _4=>-1, _5=>false, _6=>true) ListGrid.saveAllEdits(_1=>undef, _2=>undef) StatefulCanvas.handleActivate(_1=>Obj, _2=>undef) StatefulCanvas.handleClick(_1=>Obj, _2=>undef) [c]EventHandler.bubbleEvent(_1=>[IButton ID:isc_IButton_0], _2=>"click", _3=>undef, _4=>undef) [c]EventHandler.handleClick(_1=>[IButton ID:isc_IButton_0], _2=>undef) [c]EventHandler.$k5(_1=>Obj{type:error}, _2=>undef) [c]EventHandler.handleMouseUp(_1=>Obj{type:error}, _2=>undef) [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>Obj{type:error}) anonymous(event=>undef) "if (!isc.Browser.isIE && event == null) return;var returnVal=arguments.callee.$ch.isc.EH.dispatch(arguments.callee.$j2,event);return returnVal;"
Code:
public void onModuleLoad() { VLayout layout = new VLayout(10); final ListGrid listGrid = new ListGrid(); listGrid.setWidth(200); listGrid.setHeight(100); listGrid.setCanRemoveRecords(true); listGrid.setDeferRemoval(true); ListGridField countryField = new ListGridField("country", "Country"); listGrid.setFields(countryField); ListGridRecord rec1 = new ListGridRecord(); rec1.setAttribute("country", "Canada"); ListGridRecord rec2 = new ListGridRecord(); rec2.setAttribute("country", "USA"); listGrid.setRecords(new ListGridRecord[] {rec1, rec2}); layout.addMember(listGrid); IButton saveButton = new IButton("Save"); saveButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { listGrid.saveAllEdits(); } }); layout.addMember(saveButton); layout.draw(); }
Comment