Properties Methods Events Direct Link

Class Ext.ComponentQuery

Package:Ext
Defined In:ComponentQuery.js
Class:ComponentQuery
Extends:Object
Provides searching of Components within Ext.ComponentMgr (globally) or a specific Ext.Container on the page with a similar syntax to a CSS selector. Xtypes can be retrieved by their name with an optional . prefix An itemId or id must be prefixed with a #. Attributes must be wrapped in brackets Queries return an array of components. Here are some example queries.
// retrieve all Ext.Panel's on the page by xtype
    var panelsArray = Ext.ComponentQuery.query('.panel');

    // retrieve all Ext.Panels within the container with an id myCt
    var panelsWithinmyCt = Ext.ComponentQuery.query('#myCt .panel');

    // retrieve all direct children which are Ext.Panels within myCt
    var directChildPanel = Ext.ComponentQuery.query('#myCt > .panel');

    // retrieve all gridpanels and listviews
    var gridsAndLists = Ext.ComponentQuery.query('gridpanel, listview');


This class is a singleton and cannot be created directly.

Public Properties

This class has no public properties.

Public Methods

This class has no public methods.

Public Events

This class has no public events.