tracker issue : CF-4205049

select a category, or use search below
(searches all categories and all time range)
Title:

Requesting cfgrid using bind attribute generates Ext.data.reader.Reader error

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): Shigeyoshi M. / ()

Created: 08/23/2019

Components: CFForm, HTML

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:

Hi Shigeyoshi, I have tried your sample code and unable to replicate the issue in ColdFusion 2018 update 4 and ColdFusion 2016 update 11. Did you see any error in browser console while running the sample code ?   Thanks, Mukesh
Comment by Mukesh K.
31340 | September 16, 2019 12:00:35 PM GMT
Please refer to the attached screen shot. (cfgrid_error.png) Please delete cfgrid_post_error.png and coldfusion-error.log as they are for different incident.
Comment by Shigeyoshi M.
31359 | September 24, 2019 07:42:48 AM GMT