PDA

View Full Version : GroupTabPanel: Unable to Dynamically Add Group



Steve_Terry
18 Oct 2012, 2:50 PM
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. :(

mitchellsimoens
23 Oct 2012, 6:27 AM
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

milieu
22 Aug 2013, 9:16 AM
He obviously knows about Ext.ux.GroupTabPanel since it is part of the title of this thread.?

mpost
7 Nov 2013, 12:26 PM
A solution to the original problem would be appreciated.