2012-07-24 63 views
0

在我的NestedList中,我通過代理在TreeStore中加載數據。然後我在代理中更改url並閱讀它並顯示我更新的NestedList,但是首先顯示舊數據,但只是在屏幕上更新它們之後。請幫助!Sencha Touch 1. *如何在查看嵌套列表之前加載數據?

+0

我可以在使用新數據呈現之前清除嵌套列表中的數據嗎? – iGriffer 2012-07-24 10:42:34

回答

0

解決加入

app.stores.architecturalPlaceStore.proxy.url = urlString+"qrcode/load-arch-places?pid="+window.localStorage.getItem("cur-root-nid"); 
app.stores.architecturalPlaceStore.read(); 
app.stores.architecturalPlaceStore.on("read",function(store,records,index){ 
            Ext.dispatch(
              { 
               controller: 'controller', 
               action: 'archPlaces', 
               historyUrl: 'archPlaces', 
               animation: { 
                type: 'slide' 
               } 
              }); 

           }) 

,這給控制器:在煎茶觸摸1

archPlaces:function() 
    {    
     console.log("Arch places function"); 
     if (! this.archPlaceSelector) 
     { 
      globalMask[2].show(); 
      this.archPlaceSelector = this.render({ 
       xtype: 'ArchPlaceSelector', 
       renderHidden: true 
      }); 
     } 
     this.application.viewport.setActiveItem(this.archPlaceSelector); 
    }, 

「加載」 事件TreeStore *不費一槍!它的錯誤!

相關問題