pau*_*pwr 0 sencha-touch sencha-touch-2
您好,我有一个使用代理填充商店的应用程序。我想通过单击按钮清除商店,并让用户输入不同的信息并重新填充(如果有意义)。我目前正在使用:
window.location.reload();
Run Code Online (Sandbox Code Playgroud)
但这会导致白屏几秒钟,这不太好。我还尝试过以下操作:
var store = Ext.getStore('Places');
store.getProxy().clear();
store.data.clear(); store.sync();
Run Code Online (Sandbox Code Playgroud)
但这给出了与 .getProxy() 有关的错误
我也尝试过:
Ext.StoreMgr.get('Places').removeAll();
Ext.StoreMgr.get('Places').sync();
Run Code Online (Sandbox Code Playgroud)
但是当我去重新填充旧数据时仍然存在。有没有办法清理商店?
清除商店的最佳方法是
var store = Ext.getStore('SessionStore');
store.load();
store.getProxy().clear();
store.data.clear();
store.sync();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4047 次 |
| 最近记录: |