-
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' });
-
14 Oct 2011 8:48 AM #2
lol... n/m
of course... it's a property of the class, not part of the config, duh.
-
14 Oct 2011 8:54 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
- Answers
- 28
It seems like it should actually be a config as well as a property. Creating a ticket for this.
-
14 Oct 2011 9:55 PM #4Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
- Answers
- 24
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' });Sencha Touch Lead Architect


Reply With Quote
