我有一个嵌套列表,必须根据用户在Ext.Carousel中选择的内容填充新数据。如何在Sencha Touch中更新嵌套列表/树存储?
TreeStore.load(newData) // this does not work :(
TreeStore.removeAll() // this works!
看来,文档和论坛上没有答案,因为我一直在寻找2-3天。先谢谢你。
我有一个嵌套列表,必须根据用户在Ext.Carousel中选择的内容填充新数据。如何在Sencha Touch中更新嵌套列表/树存储?
TreeStore.load(newData) // this does not work :(
TreeStore.removeAll() // this works!
看来,文档和论坛上没有答案,因为我一直在寻找2-3天。先谢谢你。
我已经结束了以下解决方案:
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(); };
},
与内存代理的setProxy /荷载组合工作完全好! –