2013-07-24 94 views
0

我的系統有2個視圖:登錄和帳戶。帳戶視圖是一個具有5個標籤的標籤面板。如果用戶登錄系統成功,系統將顯示帳戶的第二個標籤視圖。我曾嘗試過很多方法來做到這一點,但所有這些方法都無法正常工作。事件寫在控制器中。在sencha touch 2的標籤面板上激活活動項目的動畫2

在登錄操作:

if (loginSuccess) { 
    this.redirectTo("account"); 
} 

在確定路線的帳戶,我寫的3種方式。 第一種方式:

var view = this.getAccountView(); 
view.setActiveTab(1); 
Ext.Viewport.animateActiveItem(view, {type:'slide'}); 

方式二:

var view = this.getAccountView(); 
view.animateActiveItem(1, {type: 'slide', direction: 'left'}); 

第三條道路:

var view = this.getAccountView(); 
view.setActiveItem(1); 
Ext.Viewport.animateActiveItem(view, {type:'slide'}); 

他們都是去 「第一個標籤」 而不是 「第二個選項卡」。有人知道嗎?謝謝。

回答

0

如果裁判也指出,應該一起工作:

this.getAccountView().setActiveItem(1);