PDA

View Full Version : [CLOSED] Find Tab object in Tab Panel



speedstepmem4
Oct 22, 2013, 10:10 AM
Hi,

How to find the tab object in tabpanel?

Eariler i have used the following code. Here "tabId" is Tab2.


function GetActiveTabExtObj(tabId) {
var tpPortal = Ext.getCmp('tpPortal');
var activeTabId = tpPortal.getActiveTab().id;
subTab = document.getElementById(activeTabId + '_IFrame').contentWindow.Ext.getCmp(tabId);
return subTab;
}

Daniil
Oct 22, 2013, 3:28 PM
Hi @speedstepmem4,

Please try

subTab = tpPortal.getActiveTab().getBody().Ext.getCmp(tabId );

geoffrey.mcgill
Oct 22, 2013, 4:56 PM
Hi @speedstepmem4,

Please try

subTab = tpPortal.getActiveTab().getBody().Ext.getCmp(tabId );

The following option should work as well, although it would depend on what the value of "tabId" is.


subTab = tpPortal.getActiveTab().getBody().App[tabId];