whalethewise
8 Feb 2012, 3:51 PM
Hi
In 4.0.7 I was able to add child components in initComponent function. For example for Tab Panel
Now with 4.1 it gives me 'items is undefined' error in getRefItems() function of AbstractContainer when I do not specify items in the config init and trying to add it in initComponent function for this TabPanel. Any suggestions?
Thanks
Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
initComponent: function() {
this.items = [{ title: 'Foo'
}, {
title: 'Bar',
tabConfig: {
title: 'Custom Title',
tooltip: 'A button tooltip'
}
}]
this.callParent(arguments);
}
});
In 4.0.7 I was able to add child components in initComponent function. For example for Tab Panel
Now with 4.1 it gives me 'items is undefined' error in getRefItems() function of AbstractContainer when I do not specify items in the config init and trying to add it in initComponent function for this TabPanel. Any suggestions?
Thanks
Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
initComponent: function() {
this.items = [{ title: 'Foo'
}, {
title: 'Bar',
tabConfig: {
title: 'Custom Title',
tooltip: 'A button tooltip'
}
}]
this.callParent(arguments);
}
});