【发布时间】:2013-04-07 20:16:21
【问题描述】:
您好,我有一个使用代理填充商店的应用程序。我想通过单击按钮清除商店,让用户输入不同的信息并重新填充是否有意义。我目前正在使用:
window.location.reload();
但这会产生几秒钟的白屏,这并不好。我还尝试了以下方法:
var store = Ext.getStore('Places');
store.getProxy().clear();
store.data.clear(); store.sync();
但这给出了与 .getProxy() 相关的错误
我也试过了:
Ext.StoreMgr.get('Places').removeAll();
Ext.StoreMgr.get('Places').sync();
但是当我去重新填充旧数据时仍然存在。有没有办法清理商店?
【问题讨论】:
-
var store = Ext.getStore('Places'); store.removeAll();不工作? -
我认为问题可能在于我的选择字段没有恢复到初始值。当用户再次搜索时,相同的参数被传回。我尝试使用以下命令清除它们但没有成功: var visitEmpty = this.getVisit().setValue('food|restaurant|'); var location =this.getLocation().setValue('currentlocation'); var radiusEmpty = this.getRadius().setValue('1');
标签: sencha-touch sencha-touch-2