Threaded View

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Answers
    1
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default Answered: Does id exist as a config option for Ext.Component anymore?

    Answered: Does id exist as a config option for Ext.Component anymore?


    Does id exist as a config option for Ext.Component anymore?

    * The reason I ask is that unless I'm blind it doesn't seem to be documented.

    Thanks

  2. A Component's id is determined during instantiation and it can't be changed afterwards (immutable), hence a setId() method doesn't make sense, and that's why 'id' is a not a general config.

    There's two common ways a Component gets its custom id: either via the given 'id' class property of your custom view, or via the 'id' config property (only) during instantiation, e.g:

    Code:
    new Ext.Button({
       id: 'myButton',
       text: 'Foo'
    });

Thread Participants: 2