Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the xtype of an instantiated component?

Tags:

extjs

extjs3

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?

like image 877
Grant Zhu Avatar asked Sep 12 '25 05:09

Grant Zhu


1 Answers

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'
like image 65
Chau Avatar answered Sep 14 '25 21:09

Chau