我正在处理一个需要绑定组合框但它没有重新加载最新数据的显示器。只有一次调用数据库,然后使用缓存中的现有存储。如何让它每次都从数据库重新加载(或者至少每次我们重新打开显示时)。下面是代码。
//store
Ext.define('NetworkStore', {
extend: 'Ext.data.Store',
alias: 'NetworkStore',
fields: ['Id', 'value'],
storeId: 'NetworkStore',
autoLoad: true,
proxy: {
type: 'ajax',
useDefaultXhrHeader: false,
actionMethods: { create: "POST", read: "GET", update: "POST", destroy: "POST" },
headers: { 'Content-Type': 'application/x-www-form-urlencode' },
limitParam: false,
startParam: false,
pageParam: false,
extraParams: {
Style: 1
},
url: 'url',
reader: {
type: 'json'
}
}
});
xtype: 'combo',
name: 'NetworkIDList',
store: Ext.create('NetworkStore').load({
params: {
Style: 3
}
}),