1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    25
    Vote Rating
    0
    Steve_Terry is on a distinguished road

      0  

    Default Unanswered: GroupTabPanel: Unable to Dynamically Add Group

    Unanswered: GroupTabPanel: Unable to Dynamically Add Group


    Hi there,

    For quite a bit today, I have been attempting to dynamically add a new group to a grouptabpanel and have been unsuccessful.

    Apparently in ExtJs versions < 4, there used to be a class "GroupTabs.js" which is no longer available in ExtJs 4.x so it appears that in order to add a group it must be done manually versus a ".add(grouptab)" method.

    With that in mind, I proceeded to look at the source of the grouptabpanel and noticed that after store creation, the items of the grouptabpanel are a tree panel and a container (with card layout) so therefore I would imagine doing a "grouptabpanel.add(xxxxxx)" would also be unsuccessful (which it was of course) since it would essentially be adding another item following the tree panel and container and that's not right.

    My eventually solution (which is incorrect I know) was to...

    1) .appendChild(mygroupobj) to the root node of the tree panel which works in terms of displaying purposes only

    and...

    2) .add(theActualPanelItems) to the container so they would be added to the card layout and somehow linking the item in the container to the selected node of the tree panel.

    Of course this method does not work but I attempted the follow the path of how the source codes "createTreeStore" processed the me.items and displayed them.

    I have searched online via google/forums and could not find any pointers as to how to simply add a new group to a grouptabpanel dynamically.

    All examples I have seen online/api basically show the grouptabpanel already with static groups and that works of course, it's just when I attempt to add a group dynamically.

    Is there any possible way to accomplish this task as I'm probably missing a key item or misunderstanding the process.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,824
    Answers
    3470
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      -1  

    Default


    Quote Originally Posted by Steve_Terry View Post
    Apparently in ExtJs versions < 4, there used to be a class "GroupTabs.js" which is no longer available in ExtJs 4.x so it appears that in order to add a group it must be done manually versus a ".add(grouptab)" method.
    Looking at 4.1.1 there is Ext.ux.GroupTabPanel
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2013
    Posts
    14
    Answers
    1
    Vote Rating
    3
    milieu is on a distinguished road

      -1  

    Default


    He obviously knows about Ext.ux.GroupTabPanel since it is part of the title of this thread.‚Äč

  4. #4
    Sencha User
    Join Date
    Sep 2012
    Posts
    83
    Vote Rating
    5
    mpost is on a distinguished road

      0  

    Default


    A solution to the original problem would be appreciated.