jaapdev
20 Apr 2012, 12:29 AM
I use Ext Designer to create my pages and I would like to set configs of subcomponents before rendering the components. The only option I know to do this is to promote an item to a class. But I don't want all items to be set as a class.
Example:
The following code is being generated by the Ext Designer.
Ext.define('DummyApp.view.ui.Deploy', {
extend: 'Ext.container.Viewport',
layout: {
type: 'fit'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'panel',
title: 'My Panel',
items: [
{
xtype: 'button',
text: 'MyButton'
}
]
}
]
});
me.callParent(arguments);
}
});
And this one:
Ext.define('DummyApp.view.Deploy', {
extend: 'DummyApp.view.ui.Deploy',
initComponent: function() {
var me = this;
me.callParent(arguments);
}
});
How can I set e.g. the Button configs before rendering this component?
Example:
The following code is being generated by the Ext Designer.
Ext.define('DummyApp.view.ui.Deploy', {
extend: 'Ext.container.Viewport',
layout: {
type: 'fit'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'panel',
title: 'My Panel',
items: [
{
xtype: 'button',
text: 'MyButton'
}
]
}
]
});
me.callParent(arguments);
}
});
And this one:
Ext.define('DummyApp.view.Deploy', {
extend: 'DummyApp.view.ui.Deploy',
initComponent: function() {
var me = this;
me.callParent(arguments);
}
});
How can I set e.g. the Button configs before rendering this component?