Firefox: 3.6.10
smartgwt-2.2
I have the following simple code:
public MediaListGrid(Record[] data) {
grid = new ListGrid();
grid.setAutoFitData(Autofit.VERTICAL);
grid.setCanEdit(true);
grid.setEditEvent(ListGridEditEvent.DOUBLECLICK);
grid.setModalEditing(true);
grid.setBorder("0px");
LinkedHashMap<String,String> bizUnits = new LinkedHashMap<String,String>();
bizUnits.put("SCEA","SCEA");
bizUnits.put("SCEASIA", "SCEASIA");
bizUnits.put("SCEE", "SCEE");
bizUnits.put("SCEJ", "SCEJ");
bizUnits.put("SCEK","SCEK");
final SelectItem bizItems = new SelectItem();
bizItems.setTitle(SamConstantsFactory.getInstance( ).region_field());
bizItems.setName("regions");
bizItems.setMultiple(true);
bizItems.setMultipleAppearance(MultipleAppearance. PICKLIST);
bizItems.setValueMap(bizUnits);
bizItems.setWidth(200);
bizItems.setPickListWidth(250);
bizItems.setWrapTitle(false);
final ListGridField bizUnitField = new ListGridField("regions", "regions");
bizUnitField.setEditorType(bizItems);
grid.setFields(bizUnitField);
grid.setData(data);
}
and when I double click the list grid cell, the drop down list looks correct with the right values selected, however when I either select a new item or deselect the selected item from the drop down list, it causes a javascript error that appears to be that the values in not an array type when I use firebug to debug the javascript error. Here's the stack trace from the development mode console in eclipse, watch expression and the javascript code where the error occurs.
18:43:19.785 [ERROR] [samclient] 18:43:19.794:MUP7:WARN:Log:TypeError: _1.getLength is not a function
Arra.equals([object Array])
[c]DynamicForm.compareValues(_1=>[object Array], _2=>[object Array])
FormItem.compareValues([object Array], [object Array])
FormItem._updateValue([object Array])
SelectItem.updateValue()
SelectItem.changeToValue([object Array], true)
SelectItem.pickValue([object Array])
PickListMenu.itemClick({Obj})
PickListMenu.recordClick({Obj}, {Obj}, 0, {Obj}, 0, "<img src='http://127.0.0.1:8888/samclie..."[ 250], undef)
ListGrid.rowClick({Obj}, 0, 0)
anonymous({Obj}, 0, 0)
GridRenderer._rowClick(0, 0)
GridRenderer.click({Obj}, undef)
Canvas.handleClick({Obj}, undef)
[c]EventHandler.bubbleEvent(_1=>{Obj}, _2=>"click")
[c]EventHandler.handleClick(_1=>{Obj})
EventHandler._handleMouseUp([object MouseEvent], undef)
[c]EventHandler.handleMouseUp(_1=>[object MouseEvent])
[c]EventHandler.dispatch(_1=>isc_c_EventHandler_handl eMouseUp, _2=>[object MouseEvent])
anonymous([object MouseEvent])
unnamed()
watch expression under firebug:
* this: ["SCEA", "SCEJ"]
scopeChain: [Call { _1=}, Window
SamClient.html?gwt.codesvr=127.0.0.1:9997#adp:TPNB rnDy]
_1: ["SCEJ"]
0"SCEJ"
_2: undefined
i: undefined
The following line 481 in ISC_Core.js under firebug causes the crash while trying to do var _2=_1.getLength() since _1 is not class array type.
,isc.A.equals=function isc_Arra_equals(_1){if(_1==null||!isc.isA.List(_1) )return false;var _2=_1.getLength();if(_2!=this.getLength())return false;for(var i=0;i<_2;i++){if(_1.get(i)!=this.get(i))return false}
482return true}
See attachments for the dropdown list which shows the correct selected value of "SCEASIA" and as soon as I select a new item "SCEE", the js error occurs indicating the _1 is not a array class which it is trying to call getLength for _1 which is not a function for type other than array.
Has anyone experienced this problem? Did I do something wrong?
Thanks,
Annie
smartgwt-2.2
I have the following simple code:
public MediaListGrid(Record[] data) {
grid = new ListGrid();
grid.setAutoFitData(Autofit.VERTICAL);
grid.setCanEdit(true);
grid.setEditEvent(ListGridEditEvent.DOUBLECLICK);
grid.setModalEditing(true);
grid.setBorder("0px");
LinkedHashMap<String,String> bizUnits = new LinkedHashMap<String,String>();
bizUnits.put("SCEA","SCEA");
bizUnits.put("SCEASIA", "SCEASIA");
bizUnits.put("SCEE", "SCEE");
bizUnits.put("SCEJ", "SCEJ");
bizUnits.put("SCEK","SCEK");
final SelectItem bizItems = new SelectItem();
bizItems.setTitle(SamConstantsFactory.getInstance( ).region_field());
bizItems.setName("regions");
bizItems.setMultiple(true);
bizItems.setMultipleAppearance(MultipleAppearance. PICKLIST);
bizItems.setValueMap(bizUnits);
bizItems.setWidth(200);
bizItems.setPickListWidth(250);
bizItems.setWrapTitle(false);
final ListGridField bizUnitField = new ListGridField("regions", "regions");
bizUnitField.setEditorType(bizItems);
grid.setFields(bizUnitField);
grid.setData(data);
}
and when I double click the list grid cell, the drop down list looks correct with the right values selected, however when I either select a new item or deselect the selected item from the drop down list, it causes a javascript error that appears to be that the values in not an array type when I use firebug to debug the javascript error. Here's the stack trace from the development mode console in eclipse, watch expression and the javascript code where the error occurs.
18:43:19.785 [ERROR] [samclient] 18:43:19.794:MUP7:WARN:Log:TypeError: _1.getLength is not a function
Arra.equals([object Array])
[c]DynamicForm.compareValues(_1=>[object Array], _2=>[object Array])
FormItem.compareValues([object Array], [object Array])
FormItem._updateValue([object Array])
SelectItem.updateValue()
SelectItem.changeToValue([object Array], true)
SelectItem.pickValue([object Array])
PickListMenu.itemClick({Obj})
PickListMenu.recordClick({Obj}, {Obj}, 0, {Obj}, 0, "<img src='http://127.0.0.1:8888/samclie..."[ 250], undef)
ListGrid.rowClick({Obj}, 0, 0)
anonymous({Obj}, 0, 0)
GridRenderer._rowClick(0, 0)
GridRenderer.click({Obj}, undef)
Canvas.handleClick({Obj}, undef)
[c]EventHandler.bubbleEvent(_1=>{Obj}, _2=>"click")
[c]EventHandler.handleClick(_1=>{Obj})
EventHandler._handleMouseUp([object MouseEvent], undef)
[c]EventHandler.handleMouseUp(_1=>[object MouseEvent])
[c]EventHandler.dispatch(_1=>isc_c_EventHandler_handl eMouseUp, _2=>[object MouseEvent])
anonymous([object MouseEvent])
unnamed()
watch expression under firebug:
* this: ["SCEA", "SCEJ"]
scopeChain: [Call { _1=}, Window
SamClient.html?gwt.codesvr=127.0.0.1:9997#adp:TPNB rnDy]
_1: ["SCEJ"]
0"SCEJ"
_2: undefined
i: undefined
The following line 481 in ISC_Core.js under firebug causes the crash while trying to do var _2=_1.getLength() since _1 is not class array type.
,isc.A.equals=function isc_Arra_equals(_1){if(_1==null||!isc.isA.List(_1) )return false;var _2=_1.getLength();if(_2!=this.getLength())return false;for(var i=0;i<_2;i++){if(_1.get(i)!=this.get(i))return false}
482return true}
See attachments for the dropdown list which shows the correct selected value of "SCEASIA" and as soon as I select a new item "SCEE", the js error occurs indicating the _1 is not a array class which it is trying to call getLength for _1 which is not a function for type other than array.
Has anyone experienced this problem? Did I do something wrong?
Thanks,
Annie
Comment