1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    kabab is on a distinguished road

      0  

    Default Unanswered: Can different tabs have single(common) controller?

    Unanswered: Can different tabs have single(common) controller?


    Can different tabs of a tab panel have a single(common) controller?
    Actually i am generating new tabs in my tab panel on click of a button , these tabs need to be mapped to a controller . All these new tabs have common functionality so can i use same controller or generate new controllers dynamically for each tab at the time when new tabs are getting generated?

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    115
    Answers
    346
    vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold

      0  

    Default


    The answer is yes provided that you can refer to these tabs by using the same selector.

  3. #3
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,089
    Vote Rating
    54
    Answers
    25
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    Yes, the trick is to use itemId's (itemId's are relative to the component) and when you provide an action you then getCurrentTab() to grab a reference to which tab you are in.
    Lead Trainer / Sencha Specialist
    Teahouse Training Company

    Comprehensive Javascript, Sencha and 3rd Party Stack Training available worldwide online, and onsite in APAC, written by certified official Sencha trainers.



    Unofficial Sites:

    SenchaWorld.com - Videos, and stuff
    Sencha.Community - Tools, Extensions and Resources
    TeahouseHQ.com - Sencha Ecosystem Training Portal

    Code Validation : JSLint | JSONLint | JSONPLint

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    kabab is on a distinguished road

      0  

    Default


    thanks vietits/dawesi.
    I didnt get either of ur answer's can u be more specific / explain in detail as i am new to ExtJS

Thread Participants: 2