2011-07-18 3 views

Répondre

4

J'ai fini avec une solution suivante:

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(); }; 
}, 
+0

La combinaison setProxy/charge avec un proxy de mémoire a travaillé totalement bien! –

-3

Je crois que vous avez raison. Pour charger de nouvelles données, essayez ceci:

TreeStore.removeAll(); 
TreeStore.add(newData); 
+0

TreeStore.add() n'existe pas – nnyby

Questions connexes