在我的NestedList中,我在TreeStore中通过代理加载数据。然后我在代理中更改url并读取它并显示我更新的NestedList,但首先显示旧数据,但只是在屏幕上更新它们之后。求救!
答案 0 :(得分:0)
添加
解决app.stores.architecturalPlaceStore.proxy.url = urlString+"qrcode/load-arch-places?pid="+window.localStorage.getItem("cur-root-nid");
app.stores.architecturalPlaceStore.read();
app.stores.architecturalPlaceStore.on("read",function(store,records,index){
Ext.dispatch(
{
controller: 'controller',
action: 'archPlaces',
historyUrl: 'archPlaces',
animation: {
type: 'slide'
}
});
})
这是控制器:
archPlaces:function()
{
console.log("Arch places function");
if ( ! this.archPlaceSelector)
{
globalMask[2].show();
this.archPlaceSelector = this.render({
xtype: 'ArchPlaceSelector',
renderHidden: true
});
}
this.application.viewport.setActiveItem(this.archPlaceSelector);
},
Sencha Touch 1中TreeStore的“加载”事件。*不开火!!这是虫子!