【发布时间】:2015-09-23 14:58:17
【问题描述】:
我使用的是 ExtJs 4.2.1 版本。在store 中将remoteFilter 添加到true 后,我的网格加载了3 次。
Ext.define('PM.store.Orgs', {
extend: 'Ext.data.Store',
model: 'PM.model.org',
autoLoad: false,
remoteFilter: true,
sorters: ['orgId'],
proxy: {
type: 'ajax',
api: { read: 'api/org/findByOrgId' },
reader: { type: 'json' }
}
});
添加remoteFilter:true后,加载了3次。
【问题讨论】:
-
你能显示一些代码吗?
-
Ext.define('PM.store.Orgs', { extend: 'Ext.data.Store', model: 'PM.model.org', autoLoad: false, remoteFilter: true, sorters : ['orgId'], 代理: { type: 'ajax', api: { read: 'api/org/findByOrgId' }, reader: { type: 'json' } }, });添加 remoteFilter:true 后,它加载了 3 次。请帮忙
-
autoLoad: false,: 在哪里/何时调用 load() 函数?您可以跟踪加载(listeners: load: function() {add your tracking here})以了解它是否实际加载了 3 次
标签: javascript extjs extjs4.2