PDA

View Full Version : grouptabpanel: adding a group help!!



s.panico
1 Mar 2010, 4:34 PM
Hi guys,
please help me, i'm going crazy!! I need to add a group (and its sub group) to a grouptabpanel dynamically at runtime... i wrote this:


var struct1 = new Ext.ux.GroupTabPanel({
xtype: 'grouptabpanel',
tabWidth: 130,
activeGroup: 0,
items: [
{
mainItem: 1,
items: [
{
title: 'Tickets',
layout: 'fit',
iconCls: 'x-icon-tickets',
tabTip: 'Tickets tabtip',
style: 'padding: 10px;',
items: [new SampleGrid([0,1,2,3,4])]
},
{
xtype: 'portal',
title: 'Home',
tabTip: 'Home page',
items: [{
title: 'Body Home',
contentEl: 'myContent'
}]
}
]
}
]
});
new Ext.Panel({
layout: 'fit',
renderTo: 'myContainer',
height:400,
items: struct1
});

//try to add new group

var gtab = new Ext.ux.GroupTab ({
xtype: 'grouptab',
items:[{
id:'myitem',
title: 'NewItem',
html: 'A simple tab',
items: [{
layout: 'fit',
title: 'Tab 2',
html: 'Sub-tab one'}]
}]

});

struct1.add(gtab);

but i get this (bad) firebug raise me this exception:

"this.itemTpl is undefined"

Can anyone can help me to solve this tedious issue??

Thanx a lot
Best regards
Sergio

mikekanani
27 Jul 2010, 2:01 AM
I am having the same issue, did you find out how to solve this?