Title:
Requesting cfgrid using bind attribute generates Ext.data.reader.Reader error
| View in TrackerStatus/Resolution/Reason: To Track//PRNeedInfo
Reporter/Name(from Bugbase): Shigeyoshi M. / ()
Created: 08/23/2019
Versions: 2018
Failure Type:
Found In Build/Fixed In Build: 2018.0.04.314546 /
Priority/Frequency: Normal /
Locale/System: / Win 2016
Vote Count: 0
Problem Description:
When requesting cfgrid using bind attribute, Ext.data.reader.Reader is generated on console on the browser.
Steps to Reproduce:
1. Create two files:
[test.cfm]
<cfform>
<cfgrid format="html" name="grid1" bindOnLoad="true"
bind="cfc:bind.m1({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="id" />
<cfgridcolumn name="name" />
</cfgrid>
</cfform>
[bind.cfc]
component {
remote struct function m1(page,pageSize,gridsortcolumn,gridsortdirection) {
qEmp = queryNew("id,name", "Varchar,Varchar", [["a", "name1"],
["b", "name2"], ["c", "name3"]]);
return QueryConvertForGrid(qEmp, page, pageSize);
}
}
2. Request test.cfm
Actual Result:
Following error is displayed on [Browser console]:
"[E] Ext.data.reader.Reader: Using the deprecated "root" configuration.
Use "rootProperty" instead."
Checking source returned to the browser as below, I noticed that root:'data' is being specified at the property which of Ext.create creating Ext.data.Store:
var _cf_gridDataModel = Ext.create('Ext.data.Store',{ model :
'cf_gridmodel-__CFGRID__CFForm_1__grid1',proxy:{type:
'customcfajax',reader: {type: 'my-json',root: 'data',totalProperty:
'totalrows'},url:'/sup/bind.cfc?method=m1&pageSize=10&_cf_ajaxproxytoken=&_cf_clientid='
+ window._cf_clientid + '&_cf_rc=' + ColdFusion.requestCounter++
+'&_cf_nodebug=true&_cf_nocache=true&returnFormat=json',pageParam:'page',sortParam:'gridsortcolumn',directionParam:'gridsortdirection',simpleSortMode:true},
remoteSort:true, sortInfo:true});
Expected Result:
This error probably occurs because ExtJS has been upgraded to 6.6.0.258 on ColdFusion 2018 Update2 and higher. Even if this error occurs, it seems to be no problem with the process. But to solve the error, root should be rootProperty.
Any Workarounds:
No
Attachments:
Comments: