View Full Version : how to get project name of leaf tree depends on active tab

15 Mar 2015, 11:54 PM
hi i have tree panel and tabpanel. if the leaf tree double clicked, the tab panel title will change to the name of leaf that have been double clicked. well, how if i want to get the project name of leaf that i've clicked depends on active tab??. for ex: i have folder "Project1" in my tree panel and inside it i have leaf "a" and "b". when i double clicked on leaf "a". the active tab title will change to "a". how if i want to alert "Project1" depends that active tab "a" with button.??

here is my example script in my button. :

var titles = Ext.ComponentQuery.query('tabpanel')[0];
var activeTabs = titles.getActiveTab();
var activeTabsIndex = titles.items.findIndex('id', activeTabs.id);
var activeTabsName = activeTabs.title;

and here is my example in fiddle:

16 Mar 2015, 12:54 AM

16 Mar 2015, 1:02 AM
hei it works. thank you so much. you've help me :)