18 Oct 2012 2:50 PM #1
Unanswered: GroupTabPanel: Unable to Dynamically Add Group
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
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.
23 Oct 2012 6:27 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 email@example.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.
22 Aug 2013 9:16 AM #3
He obviously knows about Ext.ux.GroupTabPanel since it is part of the title of this thread.
7 Nov 2013 12:26 PM #4
A solution to the original problem would be appreciated.