I got problems with the extjs 4 class model. I want to get a tabpanel within a viewport. I get it running by defining a own element and auto loading it with xcode. But I’m not getting it done inside the parent class itself.
Ext.define('MyApp.views.TheWindow', {
extend : 'Ext.Viewport',
requires: [],
border : false,
layout : {
type : 'fit'
},
initComponent : function() {
this.items = this.buildItems();
this.callParent();
},
buildItems : function() {
return [
{
extend: 'Ext.TabPanel',
activeTab: 0,
alias: 'widget.MyTapPanel',
items: [
{
title: 'Artikel Manager',
html: 'test'
/*items: [
{
}
]*/
},
{
title: 'Artikel Manager',
html: 'test'
/*items: [
{
}
]*/
}
]
}
];
}
});
Whats wrong with my code?
Replace
with
And you don’t need to define alias, because you are not defining new class (Ext.define), but you just define item confgi.