2012-03-15 67 views
0

我是sencha新手,我使用的是sencha 2 mvc.I我有一個Tabpanel,第一個選項卡包含一個列表。當點擊列表中的按鈕時我想加載它的細節與form..I /交換機視圖我無法找到answer.Please幫我儘快..切換tabpanel選項卡內的視圖-sencha 2 mvc

{ 
    xtype: 'tabpanel', 
    baseCls:'tabheader', 
    cls:'tab_container', 
    scrollable:true, 
    tabBarPosition: 'top', 
    flex:1, 
    items: [ 
     { 
      xtype:'container', 
      title:'Sample', 
      id:'Sample', 
      layout:'card', 
      cardSwitchAnimation: 'slide', 
      tabBarPosition: 'top', 
      items:[ 
       { 
        title: 'Sample', 
        xtype: 'list', 
        flex:1, 
        store: 'SampleWithoutAgentOffers', 
        itemTpl: '{name}' , 
        onItemDisclosure: function(record, btn, index) { 
         Ext.Viewport.setActiveItem(1); 
        } 
       }      
      ] 
     }, 
     { 
      xtype:'panel', 
      html:'hiiii' 
     } 
    ] 
} 

在itemdisclosure我想加載view..Please幫助我..

回答

1

請參閱我對原始問題的編輯,我不確定您發佈的配置是否會甚至以JavaScript運行。

我修復了你的配置對象,所以它應該在技術上工作。但是,我無法查看您的視口對象。如果你在ItemDisclosure上試圖做的是用'hiii'html顯示面板,那麼你應該這樣做:

onItemDisclosure: function(record, btn, index) { 
    this.parent.setActiveItem(1); 
}