How to read extra properties from model store EXTJs?

流过昼夜 提交于 2019-12-02 05:30:59

问题


​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


来源:https://stackoverflow.com/questions/18264428/how-to-read-extra-properties-from-model-store-extjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!