 | extjs: problem withbody in html file must be empty. this code works correctly:
Ext.onReady(function(){
var tabs = new Ext.TabPanel
({
activeTab: 0,
items: [{
title: 'Tab 1',
html: ' if I remove this item from tabPanel while initialization, the content of other tabs becomes empty',
closable:true
}]
});
var addition = new Ext.Panel
({
id : 'addition',
title : 'tab container',
region : 'east',
collapsible : true,
margins : '3 3 3 0',
cmargins : '3 3 3 3',
items : tabs,
split : true,
width : 500
});
var rpan = new Ext.Panel
({
id : 'content',
title : 'content',
region : 'center',
collapsible : true,
margins : '3 3 3 0',
cmargins : '3 3 3 3',
html : 'empty' ,
tbar:
[
{
iconCls:'add-feed',
text:'Add Tab',
handler: function()
{
tabs.add
({
title : 'tab name',
html : 'some content',
closable : true
}).show();
},
scope: this
}
]
});
var win = new Ext.Window({
title : 'Parent window',
closable : true,
width : 700,
height : 350,
x : 300,
y : 100,
layout : 'border',
containerScroll: false,
items : [rpan,addition]
});
win.show();
});
But, if I remove this item 'Tab 1' from tabs while initialization, the content of new tabs becomes empty. I mean this tabs works incorrectly:
var tabs = new Ext.TabPanel
({
activeTab: 0
});
How can I add normal tabs without first tab in initialization of TabPanel? |