1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default Architect with Touch -- how to create event/code for tab button switch to new card

    Architect with Touch -- how to create event/code for tab button switch to new card


    Hello,
    Using Architect 2 with Touch.
    Created two tab items (Home, Topics).
    Under Topics, created activeitemchange event

    Clicking Topics tab bar item stays on Home screen
    How do I create event/code for Topics tab button to switch to new card (with userClassName MyPanel1 and userAlias mypanel1) ?

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    464
    Vote Rating
    13
    Mthor will become famous soon enough

      0  

    Default


    tabPanel.getLayout().setActiveItem(0);

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default re: tab button switch

    re: tab button switch


    That did not work for me.
    I have Panel->Tabpanel->activeItemchange which creates code:
    tabPanelActiveItemChange: function (container, value, oldvalue, options) {
    alert('HERE');
    }

    This does print 'HERE' to screen when tap any tabBarItem -- but, how to switch to SecondPanel when second tabBarItem is tapped ?

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default Re: tab button switch

    Re: tab button switch


    Slowly getting closer
    Event code is now:
    if (value.id == 'Home'){
    alert('Home');
    }
    if (value.id == 'Topics')
    {
    alert('Topics');
    }

    I have two Panels with ids Panel1 and Panel2, how to use setActiveItem() to show Panel2 (or Panel 1) ?

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    464
    Vote Rating
    13
    Mthor will become famous soon enough

      0  

    Default


    the way I told you works and is correct. go mess with some examples, plenty of them out there show you how to do this. also use === instead of ==

    setActiveItem(0) is the first tab, setActiveItem(1) is the second tab, and so on. Go through some examples that sencha provided, they really help you get your feet wet!

  6. #6
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default Re: tab button switch

    Re: tab button switch


    Tried:
    Ext.getCmp('maintabpanel').setActiveItem('topicsPanel');

    But this did not work either -- please advise.

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default re: tab button switch

    re: tab button switch


    This is not working for me:

    if (value.id === 'Topics')
    {
    alert('Topics'); // does display 'Topics'
    tabPanel.getLayout().setActiveItem(0); // does NOT show second panel -- also setActiveItem(0) does NOT show second panel
    }

  8. #8
    Sencha User
    Join Date
    Jul 2012
    Posts
    109
    Vote Rating
    3
    sencha2cool is on a distinguished road

      0  

    Default re: tab button switch

    re: tab button switch


    With Safari Developer see that Ext.getCmp('tabPanel').getLayout().setActiveItem('topicsPanel');
    causes Type Issue 'undefined' is not a function -- hmm.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi