I extended a tabpanel and registered it like such:
DVI.DviDashboard = Ext.extend(Ext.TabPanel, {
initComponent: function(){
Ext.apply(this, {
activeTab: 0,
items: [item1, item2]
});
DVI.DviDashboard.superclass.initComponent.call(this);
}
});
Ext.reg('dviDashboard', DVI.DviDashboard);
When rendered, I have a tabpanel with two tabs, item1 and item2. I would like to programatically add new tabs through the TabPanel’s add() method. I am unclear how to access the tabpanel’s methods however after extending.
I was creating the DviDashboard using xtype like this:
The function I wrote to add tabs to this panel originally looked like this:
Problem was doLayout() was not rebuilding the panel with the tab. So I modified the creation of the tabPanel with an id:
So I was able to get the tabPanel as a component. Then the function I build to add the tab was modified like so:
And this worked. Thanks to all that responded.