2012-05-07 24 views

回答

1

所有你需要的是Ext.navigation.View

從上面的鏈接試試這個簡單的代碼..

var view = Ext.create('Ext.NavigationView', { 
    fullscreen: true, 

    items: [{ 
     title: 'First', 
     items: [{ 
      xtype: 'button', 
      text: 'Push a new view!', 
      handler: function() { 
       //use the push() method to push another view. It works much like 
       //add() or setActiveItem(). it accepts a view instance, or you can give it 
       //a view config. 
       view.push({ 
        title: 'Second', 
        html: 'Second view!' 
       }); 
      } 
     }] 
    }] 
}); 
+0

是的,我想這和它的作品。但我想從我的Controller類導航到另一個視圖。由於某種原因,「推」在那裏不起作用。 :( –

+0

在這種情況下,你可以給你的'navigationview'一些'id',然後在處理函數中,你可以寫這樣的東西......'Ext.getCmp('navigate-id')。push({。 ..' –

+0

你的意思是在Main.js上指定一個'id',並從控制器類中調用它? –

相關問題