ExtJS - Component

ExtJS

Note: if we want to customize or extend ExtJS, see Extending

How can we obtain a component given its ID?

var comp = Ext.getCmp('compId'); //retrieve a Ext.Component

How can we render a component inside an existing HTML element given that we know the ID of the HTML element?

form.render(Ext.get('pageFormContainer'));

pageFormContainer is the ID of the existing HTML element.

How can we determine the xtype of a component?

x.getXType();

How can we test to see if a given component is derived from a given xtype?

x.isXType('textfield');

How can we iterate over all components on a page?

I will come back to this later.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License