我有一个嵌套列表,必须根据用户在Ext.Carousel中选择的内容填充新数据。
TreeStore.load(newData) // this does not work :(
TreeStore.removeAll() // this works!文档和论坛似乎都没有答案,因为我已经搜索了2-3天了。提前谢谢你。
发布于 2011-07-20 00:55:24
我最终得到了以下解决方案:
NestedList = Ext.extend(Ext.NestedList, {
loadData: function(data) {
this.store.setProxy({
type:'memory',
data: data,
reader: {
type: 'tree',
root: 'items'
}
});
this.store.load();
{ // some back taps to make it show the top level
this.onBackTap();
this.onBackTap();
this.onBackTap(); };
},发布于 2011-07-19 22:07:54
我相信你是对的。要加载新数据,请尝试执行以下操作:
TreeStore.removeAll();
TreeStore.add(newData);https://stackoverflow.com/questions/6737806
复制相似问题