In your case you should use a ComponentQuery to receive your tab-instances. I guess you will know at least the name of your tab so you can do
var single = Ext.ComponentQuery.query('contenttab[title=YourTabName]')[0];
Or if you need all tabs of that type.
var list = Ext.ComponentQuery.query('contenttab');
The result will always be a array therefor I used the array selector at the first example. You can do this at any point to get a instance. But the more often you do this for the same instance the more I would recommend you to store the instance as local variable. Especially when you are on the way to it within a loop.
The is also the ref property within a controller, which do some things automatically for you. Some example:
refs: [
{
ref: 'firstTab',
selector: 'contenttab[title=YourTabName]'
}
]
This will create a method named getFirstTab()
(note the auto camel-case) which refers to your tab (based on the provided query). Note that there are more options like autocreate
. I must say, I never used this, but it wraps some things up for you which may be nice at startup.
To answer your last comment of the previous question: Yes this is the correct way to do it.