Threaded View
-
14 Oct 2011 8:37 AM #1
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
-
Best Answer Posted by Jacky Nguyen
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' });


Reply With Quote