1. #1
    Ext JS Premium Member
    Join Date
    Oct 2010
    Posts
    11
    Vote Rating
    0
    jaapdev is on a distinguished road

      0  

    Default 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.

    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);
        }
    });
    And this one:

    Code:
    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?

  2. #2
    Sencha - Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    26,154
    Vote Rating
    82
    jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold

      0  

    Default


    Wrong forum? Shouldn't this belong to Ext Designer: Help & Discussion forum? I can move it there if you want.

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    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#post754690
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Ext JS Premium Member
    Join Date
    Oct 2010
    Posts
    11
    Vote Rating
    0
    jaapdev is on a distinguished road

      0  

    Default


    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.