rondinos
20 Jan 2012, 2:01 PM
Let's say I have a view like this
Ext.define('MyApp.view.ui.MyPanel', {
extend: 'Ext.panel.Panel',
height: 250,
width: 400,
title: 'My Panel',
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'button',
text: 'MyButton'
}
]
});
me.callParent(arguments);
}
});
And I want to add one more button before I invoke the parent class implementation
Ext.define('MyApp.view.button.List', {
extend: 'MyApp.view.ui.MyPanel',
alias: 'widget.buttonlist',
initComponent: function() {
var me = this;
var button = {
xtype: 'button',
text: 'MyButton2'
},
//TODO add the extra button before calling parent
me.callParent(arguments);
}
});
Ext.define('MyApp.view.ui.MyPanel', {
extend: 'Ext.panel.Panel',
height: 250,
width: 400,
title: 'My Panel',
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'button',
text: 'MyButton'
}
]
});
me.callParent(arguments);
}
});
And I want to add one more button before I invoke the parent class implementation
Ext.define('MyApp.view.button.List', {
extend: 'MyApp.view.ui.MyPanel',
alias: 'widget.buttonlist',
initComponent: function() {
var me = this;
var button = {
xtype: 'button',
text: 'MyButton2'
},
//TODO add the extra button before calling parent
me.callParent(arguments);
}
});