I have a TabPanel with 2 tabs, this Tab Panel is invoked from 2 different screens.
From First screen - We are disabling one tab and showing another one
Code:
this.invDetailPanel.invTabDetailPanel.getComponent('inv-2-tab').disable();
this.getLayout().setActiveItem(4);
The 4th Item here is....
Code:
{
xtype: 'panel',
border:false,
layout:'anchor',
items: [
me.invDetailPanel,
{
border : false,
anchor:'100% 5%'
}
]
}
From Second Screen - We are Setting this item to active.
Code:
this.getLayout().setActiveItem(1);
this.invDetailPanel.loadInvDetail(invoiceId);
The 1st Item here is ...
Code:
{
xtype: 'panel',
border:false,
autoScroll:true,
layout:'anchor',
items: [
me.invDetailPanel,
{
border : false,
anchor:'100% 5%'
}
]
}
The problem here is , after accessing invDetailPanel from second screen and again accessing it from first screen and again come back and access from second screen, The TabPanel's first tab is shown twice one after the other, we are not sure about the problem. The TabPanel has a Grid and FieldSet, these 2 items are shown 2 times one by one inside first Tab as follows.
The second Tab is fine
Inv-1-TabInvGrid
FieldSet
InvGrid
FieldSet
Any Help is appreciated.
TabPanel Code inside InvDetail Panel is......
Code:
me.invTabDetailPanel = Ext.create('Ext.tab.Panel', {
plain: true,
border:false,
items : [ {
title : 'First-Tab',
id: 'inv-1-tab',
bodyPadding: 10,
items : [me.InvGridPanel,{
xtype: 'container',
height: 20
},{
xtype:'fieldset',
title : 'Summary',
collapsible: true,
layout: 'column',
items :[{
xtype: 'container',
columnWidth:.5,
items:[{
xtype : 'component',
html : '<br/>'
}]
},{
xtype:'displayfield',
fieldLabel: 'Total Amount',
name: 'invoiceAmount',
renderer : Ext.util.Format.usMoney,
labelWidth: 150
}]
}]
}]
}, {
title : 'Second-Tab',
id: 'inv-2-tab',
bodyPadding: 10,
items : [me.invRGridPanel,{
xtype: 'container',
height: 20
},{
xtype:'fieldset',
title : 'Some Summary',
collapsible: true,
layout: 'column',
items :[{
xtype: 'container',
columnWidth:.5,
items:[{
xtype : 'component',
html : '<br/>'
}]
},{
xtype:'displayfield',
fieldLabel: 'Balance',
name: 'BalAmount',
renderer : Ext.util.Format.usMoney,
labelWidth: 150
}]
}]
}]
}]
});