Hi, look at these:
Code:
Ext.define('mv.view.some', {
extend: 'Ext.Panel',
alias: 'widget.some',
title: 'Some',
initComponent: function() {
this.items = [
{
xtype: 'form',
items: [
{
xtype: 'textfield',
name : 'name',
fieldLabel: 'Name'
},
{
xtype: 'textfield',
name : 'email',
fieldLabel: 'Email'
}
]
}
];
this.callParent(arguments);
}
});
Code:
Ext.define('mv.view.some', {
extend: 'Ext.Panel',
alias: 'widget.some',
title: 'Some',
items: [
{
xtype: 'form',
items: [
{
xtype: 'textfield',
name : 'name',
fieldLabel: 'Name'
},
{
xtype: 'textfield',
name : 'email',
fieldLabel: 'Email'
}
]
}
]
});
Result appears to be the same (at least visually). So why you use initComponent()? What is advantage of this?