我有一个TreeStore
,它最初成功地从一个 json 文件加载它的数据:
Ext.define('MM.store.InventoryTree', {
extend: 'Ext.data.TreeStore',
requires: 'MM.model.InventoryTree',
model:'MM.model.InventoryTree',
proxy: {
type: 'ajax',
api: {
read : 'json/inventorytree.json'
},
root: {
text: 'Countries',
expanded: true
}
}
});
我已经尝试了几件事,下面的函数对我来说很有意义,但是有些东西阻止了它实际重新加载。
onReloadButtonClick: function(){
var store = Ext.getCmp('InventoryTree').getView().getStore();
store.removeAll(); // this works!
store.reload(); // this is executed, but nothing happened (no network traffic)
}
也许它加载了它的数据,但视图阻止它显示?我会错过什么?