2013-07-17 25 views
1

我剛用Sencha Touch創建了一個小主頁。現在我想使用按鈕鏈接到另一個網站/頁面。我怎樣才能做到這一點?我不想使用標準的標籤欄。按鈕到Sencha Touch的另一個頁面

Ext.define('RMA-App.view.Main', { 
    extend: 'Ext.Container', 
    xtype: 'main', 
    requires: [ 
     'Ext.TitleBar' 
    ], 
    config: { 
     items: [ 
      { 
       docked: 'top', 
       xtype: 'titlebar', 
       title: 'RMA-App' 
      }, 
      { 
       xtype: 'button', 
       text: 'Event anlegen', 
       ui: 'normal', 
       iconCls: 'add', 
       iconMask: 'true', 
       iconAlign: 'top', 
       margin: '5 5 5 5' 
      }, 
      { 
       xtype: 'button', 
       text: 'Events anzeigen', 
       ui: 'normal', 
       iconCls: 'list', 
       iconMask: 'true', 
       iconAlign: 'top', 
       margin: '5 5 5 5' 
      } 
     ] 
    } 
}); 

回答

1

您可以瀏覽查看與處理

{ 
    xtype: 'button', 
    text: 'Events anzeigen', 
    handler: function() { 
     var someRootContainer = Ext.ComponentQuery.query("#someRootContainer"); 
     someRootContainer.removeAll(); 
     someRootContainer.add(Ext.create(yourTargetView)); 
    } 
} 
+0

嗯,我想我說不出它。我想鏈接到另一個視圖而不是另一個URL。這是否類似? – torhoehn

+0

你正在尋找的是一個卡面板,在主要的sencha網站上查找它的教程。 – Reimius

+0

我調整了我的答案,以您的方案。但是Reimius是對的,只要你呆在你的應用程序中,這只是一個自我實現的卡片佈局,沒有任何動畫。 – Christoph

相關問題