-
20 Apr 2012 12:29 AM #1
How to change configs of subcomponents created by Ext Designer
How to change configs of subcomponents created by Ext Designer
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.
And this one:Code: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); } });
How can I set e.g. the Button configs before rendering this component?Code:Ext.define('DummyApp.view.Deploy', { extend: 'DummyApp.view.ui.Deploy', initComponent: function() { var me = this; me.callParent(arguments); } });
-
20 Apr 2012 3:12 PM #2
Wrong forum? Shouldn't this belong to Ext Designer: Help & Discussion forum? I can move it there if you want.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
20 Apr 2012 10:16 PM #3
Promoting the subcomponent to a class is the only way to do this at the moment.
Sencha Architect may add the ability to prepareConfig's like so
http://www.sencha.com/forum/showthre...l=1#post754690Aaron Conran
@aconran
Sencha Architect Development Team
-
22 Apr 2012 10:53 PM #4
Thanks for the reply. It would be great if this feature would be added!
Promoting to a class is a bit of an overkill for some situations.
jsakalos, changing this thread to a different forum is ok.


Reply With Quote