javascript - ExtJS 6 access messageProperty in store sync's callback -


i want display message server in ui after synchronizing extjs grid. here's excerpt of how goes:

this.store.sync({         callback: function (records, operation, success) {           // messageproperty accessing code         },         success: function (batch, options) {           // messageproperty accessing code         },         failure: function (batch, options) {         }     }); 

here's piece of store definition:

 proxy: {     headers: { 'accept': 'application/json' },     limitparam: undefined,     pageparam: undefined,     startparam: undefined,     paramsasjson: false,     type: 'ajax',             // ...     reader: {         type: 'json',         rootproperty: 'data',         messageproperty: 'message'     },     // ... }, 

here's data comes server (omitted data inside array:

{  "data":[  ],  "message":"success!" } 

the application doesn't seem have issues reading data property (i.e. grid works properly), i'm not able access message property in either callback or success event of sync method. error message:

uncaught typeerror: cannot read property 'message' of undefined(…)  createaccessor: (function () {     var re = /[\[\.]/;     return function (expr) {         var me = this,             simple = me.getusesimpleaccessors(),             operatorindex, result, current, parts, part, inexpr, isdot, isleft, isright, special, c, i, bracketed, len;         if (!(expr || expr === 0)) {             return;         }         if (typeof expr === 'function') {             return expr;         }         if (!simple) {             operatorindex = string(expr).search(re);         }         if (simple === true || operatorindex < 0) {             result = function (raw) {                 return raw[expr];  <-------- goes wrong @ point             };         }  

if debug through code, @ point raw variable loses value, gives expected undefined error message. question how able retrieve message property in callback or success functions of ext 6 store?

in extjs 6 sencha has changed default value of keeprawdata false. if change true, should work expected again. sencha docs tell there chance of memory leak, have not yet experienced such issue.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -