Getting this.selection JS error

Getting this.selection JS error when using optionDatasource(drop down select) in listGrid filterEditor.

I am using listGrid.setShowFilterEditor(true) to display (and toggle) filterEditor when user click on search button at toolstrip button.

Below is the error and if I remove optionDataSource fields, this works fine for me.

this.selection is undefined
/isomorphic/system/modules/ISC_Forms.js
Line 196

Anything which I might be doing wrong?

Thanks,
Danny.

Always post a stack trace (from the Developer Console in IE, or from Firebug) with any JavaScript error. Better yet, post a standalone test case.

Firebug stack trace

Deleted chunk of data due to file size restriction.

firebugstacktrace.txt (9.09 KB)

Not really any actionable information here. Can you modify one of the samples minimally to reproduce this error?

By the way, stack traces captured in IE are typically more informative (and accurate).

Actually, I have a comboBoxItem in listgrid fields and it fetches data from server. If I remove this from my datasource then problem is gone. It means that if I have comboBoxItem with optiondatasource defined and I open the filterEditor in listgrid then I am getting this error.

I have no clue if this helps but I am not able to produce standalone case for this.

Thanks,
Danny.

Unfortunately, it doesn’t really. If you get a chance to narrow down the problem let us know.

I can create this every time

Just have showFilterEditor: true on a list grid, that contains databound combobox items and IE will through this error every time, as follows.

isc.ListGrid.create({ID: “TMP”, showFilterEditor: true, dataSource: “somedatasource”, autoFetchData: true,
fields: [
{name: “test”, optionDataSource: “somedatasource”}
]
});

fails every time.

Here’s some of the log messages for this type of error

All happens when filtereditor is shown either as set in the listgrid or programmatically, only when there are select items with optiondatasources, it seeems.

‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[2], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[2], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_62 (created by: isc_PickListMenu_60)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$50e(_1=>Obj, _2=>Obj, _3=>Obj)
“var _4=this.getClientOnlyResponse(_3.$374),_5=_3.$374;this.$38b(_2,_4,_5,_1,_3)”
** recursed on Class.fireCallback

18:08:56.194:TMR6:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[2], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[2], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_65 (created by: isc_PickListMenu_63)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$50e(_1=>Obj, _2=>Obj, _3=>Obj)
“var _4=this.getClientOnlyResponse(_3.$374),_5=_3.$374;this.$38b(_2,_4,_5,_1,_3)”
** recursed on Class.fireCallback

18:08:56.501:XRP8:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[4], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[4], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_56 (created by: isc_PickListMenu_54)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

18:08:56.584:XRP1:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[26], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[26], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_68 (created by: isc_PickListMenu_66)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

18:08:56.652:XRP3:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[3], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[3], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_71 (created by: isc_PickListMenu_69)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

18:08:56.711:XRP5:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[2], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[2], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_77 (created by: isc_PickListMenu_75)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

18:08:56.780:XRP7:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[9], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[9], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_59 (created by: isc_PickListMenu_57)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

18:08:56.841:XRP9:WARN:Log:Error:
‘‘this.selection’ is null or not an object’
in http://localhost:8080/modules/client/system/modules/ISC_Forms.js?isc_version=7.0.0.js
at line 227
ScrollingMenu.dataChanged(undef, undef, undef, undef)
Class.invokeSuper(_1=>null, _2=>“dataChanged”, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>“dataChanged”, _2=>Obj{length:4}, _3=>undef)
PickListMenu.dataChanged(undef, undef, undef, undef)
dataChangedObservation(operationType=>undef, originalRecord=>undef, rowNum=>undef, updateData=>undef)
ResultSet.$ee()
ResultSet.$390(_1=>Array[2], _2=>Obj)
ResultSet.fetchRemoteDataReply(_1=>Obj, _2=>Array[2], _3=>Obj)
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>[ResultSet ID:isc_ResultSet_74 (created by: isc_PickListMenu_72)], _5=>undef) on [Class Class]
Class.fireCallback(_1=>Obj, _2=>“dsResponse,data,dsRequest”, _3=>Array[3], _4=>undef)
“return isc.Class.fireCallback(_1,_2,_3,this,_4)”
DataSource.$38b(_1=>[XMLDoc <response>], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj)
DataSource.$57b(_1=>Obj, _2=>Obj)
“this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)”
** recursed on Class.fireCallback

That seems to be the case in a number of working examples. Let us know if you can produce a standalone test case.