How to read extra properties from model store EXTJ

2019-02-26 01:30发布

问题:

​Json reader in is defined for the store as follows:

Ext.define('App.store.MyList', {
    extend : 'Ext.data.Store',
    model : 'App.model.MyList',
    pageSize : 100,
    proxy : {
       type : 'ajax',
         actionMethods : {
                    create : 'POST',
                    read : 'POST',
                    update : 'POST',
                    destroy : 'POST'
        },
        root : 'results',
        url : 'aaa.htm',
        reader : {
                    type : 'json',
                    root : 'results',
                    totalProperty: 'totalCount',
                    extraProperty: 'abcd'
    },
    simpleSortMode : true
     }
});

How do I read extra property outside the root? I tried to put one inside the reader, it did not work.

回答1:

try this

grid.getStore().getProxy().getReader().extraProperty