Hello:
I'm having a problem using RecordList (latest build from 9/21/09.
When I call the RecordList.remove method I'm getting the following error;
Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.smartgwt.client.data.RecordList.removeAt(Native Method)
Here's my code:
Ultimately I'm looking for a way to update a record in the list. If there's a better and supported way please let me know.
thanks!
Chris
I'm having a problem using RecordList (latest build from 9/21/09.
When I call the RecordList.remove method I'm getting the following error;
Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.smartgwt.client.data.RecordList.removeAt(Native Method)
Here's my code:
Code:
RecordList rl = _parentList.getRecordList(); int index = rl.findIndex("id",_currentRecord.getAttributeAsInt("id")); if(index != -1) { Record r = rl.removeAt(index); //This line throws the error r.setAttribute("lastname", (String)_lastName.getValue()); r.setAttribute("firstname", (String)_firstName.getValue()); rl.addAt(r,index); }
thanks!
Chris
Comment