| Package: | CQ.Ext |
| Class: | ComponentMgr |
| Extends: | Object |
| Clientlib: | cq.widgets |
Provides a registry of all Components (instances of CQ.Ext.Component or any subclass thereof) on a page so that they can be easily accessed by component id (see get, or the convenience method CQ.Ext.getCmp).
This object also provides a registry of available Component classes
indexed by a mnemonic code known as the Component's xtype.
The xtype provides a way to avoid instantiating child Components
when creating a full, nested config object for a complete Ext page.
A child Component may be specified simply as a config object
as long as the correct xtype is specified so that if and when the Component
needs rendering, the correct type can be looked up for lazy instantiation.
For a list of all available xtypes, see CQ.Ext.Component.
| Method | Defined By | |
|---|---|---|
create( Object config, Constructor defaultType ) : CQ.Ext.Component Creates a new Component from the specified config object using the
config object's xtype to determine the class to in...
Creates a new Component from the specified config object using the
config object's xtype to determine the class to instantiate.
Parameters:
|
ComponentMgr | |
createPlugin( Object config, Constructor defaultType ) : CQ.Ext.Component Creates a new Plugin from the specified config object using the
config object's ptype to determine the class to insta...
Creates a new Plugin from the specified config object using the
config object's ptype to determine the class to instantiate.
Parameters:
|
ComponentMgr | |
get( String id ) : CQ.Ext.Component Returns a component by id.
For additional details see CQ.Ext.util.MixedCollection.get.
Returns a component by id.
For additional details see CQ.Ext.util.MixedCollection.get.
Parameters:
|
ComponentMgr | |
isPluginRegistered( CQ.Ext.Component ptype ) : Boolean Checks if a Plugin type is registered.
Checks if a Plugin type is registered.
Parameters:
|
ComponentMgr | |
isRegistered( CQ.Ext.Component xtype ) : Boolean Checks if a Component type is registered.
Checks if a Component type is registered.
Parameters:
|
ComponentMgr | |
onAvailable( String id, Function fn, Object scope ) : void Registers a function that will be called when a Component with the specified id is added to ComponentMgr. This will h...
Registers a function that will be called when a Component with the specified id is added to ComponentMgr. This will happen on instantiation.
Parameters:
|
ComponentMgr | |
register( CQ.Ext.Component c ) : void Registers a component.
Registers a component.
Parameters:
|
ComponentMgr | |
registerPlugin( String ptype, Constructor cls ) : void Registers a new Plugin constructor, keyed by a new
CQ.Ext.Component.ptype.
Use this method (or its alias CQ.Ext.preg)...
Registers a new Plugin constructor, keyed by a new CQ.Ext.Component.ptype. Use this method (or its alias CQ.Ext.preg) to register new plugins for CQ.Ext.Components so that lazy instantiation may be used when specifying Plugins.
Parameters:
|
ComponentMgr | |
registerType( String xtype, Constructor cls ) : void Registers a new Component constructor, keyed by a new
CQ.Ext.Component.xtype.
Use this method (or its alias CQ.Ext.re...
Registers a new Component constructor, keyed by a new CQ.Ext.Component.xtype. Use this method (or its alias CQ.Ext.reg) to register new subclasses of CQ.Ext.Component so that lazy instantiation may be used when specifying child Components. see CQ.Ext.Container.items
Parameters:
|
ComponentMgr | |
unregister( CQ.Ext.Component c ) : void Unregisters a component.
Unregisters a component.
Parameters:
|
ComponentMgr | |