2011-11-08 54 views
0

我有物品清單,而點擊特定清單物品時,它會顯示該物品的詳細信息..我有問題,第一項點擊它顯示正確的結果,但同時點擊下一個項目我得到該特定項目的細節,但它顯出老項目details.this是我的代碼如何更新或刷新sencha觸摸中的標籤面板的內容

RadMobApp.views.patPanel = Ext.extend(Ext.Panel, { 
    id: 'pathView', 
    layout : 'fit', 
initComponent: function() { 
     this.titleTxtc = new Ext.Component({ 
      cls : 'top_title_text', 
      html: 'History' 
     }); 
     this.backButton = new Ext.Button({ 
       text: 'back', 
       height:15, 
       ui:'back', 
       handler: function() { 
          controller.showPanel(); 
          }, 
       scope: this 
     }); 
     this.titleBar = new Ext.Toolbar({ 
      dock: 'top', 
      cls: "top_tool_bar2", 
      height: 42, 
      items: [this.backButton, {xtype: 'spacer'}, this.titleTxtc, {xtype: 'spacer'}] 
     }); 

     var tabs = new Ext.TabPanel({ 
      xtype:"tabpanel", 
      id: 'tabpanel', 
      renderTo: Ext.getBody(), 
      width:400, 
      height: 150, 
      activeTab: 0, 
      layoutOnTabChange: true, 
      tabBar: { 
      cls: "top_tab_panel1", 
      height: 42, 
      style: 'padding-left:2px;' 
      }, 
      items: [{ 
       xtype: 'Panel1',  
       id: 'panel1', 
       title: 'Panel1', 
       height: 100 
      },{ 
       xtype: 'Panel2', 
       id: 'panel2', 
       title: 'Panel2', 
       height: 100 
      },{ 
       xtype: 'panel3', 
       id: 'panel3', 
       title: 'Panel3', 
       height: 100, 
       listeners: { 
        beforeshow: function(p) { 
         scope: this; 
         /* var tabPanel = p.ownerCt; 
         var tabEl = tabPanel.getTabEl(prmPanel); 
         Ext.fly(tabEl).child('span.x-tab-strip-text', 
          true).qtip = 'Tab is now enabled';  
         Ext.getCmp('panel2').enable(); */   
        } 
       } 
      }] 
     }); 

     this.dockedItems = [this.titleBar]; 
     this.items = [tabs]; 
     RadMobApp.views.patPanel.superclass.initComponent.call(this); 
    } 

}); 

如何清除標籤面板?在此先感謝

回答

0

嘗試將配置選項

remoteFilter:真

您的商店從中加載數據到list.ie

new Ext.data.Store({ 
     model: 'Test', 
     sortOnLoad: true, 

     remoteFilter : true, 
     autoLoad: true, 
     getGroupString : function(record) { 
      return record.get('FullName_FirstLast')[0]; 
     }, 
     proxy: { 
      type: 'ajax', 
      url : testUrl, 
      reader: { 
       type: 'json', 
       root: 'test' 
      } 
     } 

    })