Suppose I have an component's instance but I don't know what it is. Is there a convenient way to get the xtype of this component?
Asked
Active
Viewed 1.1k times
1 Answers
12
According to the API all components (all types of Ext JS objects with an xtype
I guess) inherits a method getXType()
, which you can use like in the following:
var t = new Ext.form.TextField();
alert(t.getXType()); // alerts 'textfield'

Chau
- 5,540
- 9
- 65
- 95
-
Oops...I just scanned the api of Ext.Component but failed to find it...Thanks. – Grant Zhu Feb 20 '12 at 09:59