| applyTo : MixedSpecify the id of the element, a DOM element or an existing Element corresponding to a DIV
+ A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic. Config Options|
| alignment : String | Editor | | allowBlur : Boolean | Editor | | allowDomMove : Boolean Whether the component can move the Dom node when rendering (defaults to true). | Component | | applyTo : MixedSpecify the id of the element, a DOM element or an existing Element corresponding to a DIV
that is already present in... Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
that is already present in the document that specifies some structural markup for this
component.
@@ -51,9 +44,9 @@ different DOM elements. Example usage: {
}
}
| Component | | autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
them on render... True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
-them on render (defaults to false). | Component | | autoSize : Boolean/StringTrue for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only,
-or ... True for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only,
-or "height" to adopt the height only (defaults to false) | Editor | | cancelOnEsc : Boolean True to cancel the edit when the escape key is pressed (defaults to false) | Editor | | clearCls : StringThe CSS class used to to apply to the special clearing div rendered
+them on render (defaults to false). | Component | | autoSize : Boolean/StringTrue for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only,
+or "hei... True for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only,
+or "height" to adopt the height only, "none" to always use the field dimensions. (defaults to false) | Editor | | cancelOnEsc : Boolean True to cancel the edit when the escape key is pressed. Defaults to true. | Editor | | clearCls : StringThe CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide... The CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide field clearing (defaults to
'x-form-clear-left').
@@ -63,7 +56,21 @@ manager (e.g. fieldLabel is specified or isFormField=true is specified.
See Ext.layout.FormLayout.fieldTpl also. | Component | | cls : StringAn optional extra CSS class that will be added to this component's Element (defaults to ''). This can be
useful for ... An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be
-useful for adding customized styles to the component or any of its children using standard CSS rules. | Component | | completeOnEnter : Boolean True to complete the edit when the enter key is pressed (defaults to false) | Editor | | constrain : Boolean True to constrain the editor to the viewport | Editor | | ctCls : StringAn optional extra CSS class that will be added to this component's container. This can be useful for
+useful for adding customized styles to the component or any of its children using standard CSS rules. | Component | | completeOnEnter : Boolean True to complete the edit when the enter key is pressed. Defaults to true. | Editor | | constrain : Boolean True to constrain the editor to the viewport | Editor | | contentEl : StringOptional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
+for this comp... Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
+for this component.
+
+- Description :
+
This config option is used to take an existing HTML element and place it in the layout element
+of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
+- Notes :
+
The specified HTML element is appended to the layout element of the component after any configured
+HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
+The specified HTML element used will not participate in any layout
+scheme that the Component may use. It is just HTML. Layouts operate on child items .
+Add either the x-hidden or the x-hide-display CSS class to
+prevent a brief flicker of the content before it is rendered to the panel.
+ | Component | | ctCls : StringAn optional extra CSS class that will be added to this component's container. This can be useful for
adding customize... An optional extra CSS class that will be added to this component's container. This can be useful for
adding customized styles to the container or any of its children using standard CSS rules. See
Ext.layout.ContainerLayout.extraCls also.
@@ -74,7 +81,8 @@ which assigns a value by default:
To configure the above Class with an extra CSS class append to the default. For example,
for BoxLayout (Hbox and Vbox): ctCls: 'x-box-layout-ct custom-class'
- | Component | | disabled : Boolean Render this component disabled (default is false). | Component | | disabledClass : String CSS class added to the component when it is disabled (defaults to 'x-item-disabled'). | Component | | field : Ext.form.Field The Field object (or descendant) or config object for field | Editor | | fieldLabel : StringThe label text to display next to this Component (defaults to '').
+ | Component | | data : MixedThe initial set of data to apply to the tpl to
+update the content area of the Component. | Component | | disabled : Boolean Render this component disabled (default is false). | Component | | disabledClass : String CSS class added to the component when it is disabled (defaults to 'x-item-disabled'). | Component | | field : Ext.form.Field The Field object (or descendant) or config object for field | Editor | | fieldLabel : StringThe label text to display next to this Component (defaults to '').
Note: this config is only used when this Component... The label text to display next to this Component (defaults to '').
Note: this config is only used when this Component is rendered by a Container which
has been configured to use the FormLayout layout manager (e.g.
@@ -113,7 +121,11 @@ since items are automatically laid out when they are first shown (no sizing
is done while hidden). | Component | | hideParent : BooleanTrue to hide and show the component's container when hide/show is called on the component, false to hide
and show the... True to hide and show the component's container when hide/show is called on the component, false to hide
and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide
-button on a window by setting hide:true on the button when adding it to its parent container. | Component | | id : StringThe unique id of this component (defaults to an auto-assigned id).
+button on a window by setting hide:true on the button when adding it to its parent container. | Component | | html : String/ObjectAn HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML conten... An HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML content is added after the component is rendered,
+so the document will not contain this HTML at the time the render event is fired.
+This content is inserted into the body before any configured contentEl is appended. | Component | | id : StringThe unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to ... The unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to access the component later and you do
not have an object reference available (e.g., using Ext.getCmp).
@@ -126,8 +138,11 @@ sub-elements using this component's id as the parent.
Note: to access the container of an item see ownerCt . | Component | | ignoreNoChange : BooleanTrue to skip the edit completion process (no save, no events fired) if the user completes an edit and
the value has n... True to skip the edit completion process (no save, no events fired) if the user completes an edit and
the value has not changed (defaults to false). Applies only to string values - edits for other data types
-will never be ignored. | Editor | | itemCls : StringAn additional CSS class to apply to the div wrapping the form item
-element of this field. If supplied, itemCls at th... An additional CSS class to apply to the div wrapping the form item
+will never be ignored. | Editor | | itemCls : StringNote: this config is only used when this Component is rendered by a Container which
+has been configured to use the Fo... Note: this config is only used when this Component is rendered by a Container which
+has been configured to use the FormLayout layout manager (e.g.
+Ext.form.FormPanel or specifying layout:'form').
+ An additional CSS class to apply to the div wrapping the form item
element of this field. If supplied, itemCls at the field level will override
the default itemCls supplied at the container level. The value specified for
itemCls will be added to the default class ('x-form-item').
@@ -136,22 +151,22 @@ the default itemCls supplied at the container level. The value s
you to write standard CSS rules that can apply to the field, the label (if specified), or
any other element within the markup for the field.
Note: see the note for fieldLabel.
-Example use: // Apply a style to the field's label:
+Example use:// Apply a style to the field's label:
<style>
.required .x-form-item-label {font-weight:bold;color:red;}
</style>
new Ext.FormPanel({
- height: 100,
- renderTo: Ext.getBody(),
- items: [{
- xtype: 'textfield',
- fieldLabel: 'Name',
- itemCls: 'required' //this label will be styled
- },{
- xtype: 'textfield',
- fieldLabel: 'Favorite Color'
- }]
+ height: 100,
+ renderTo: Ext.getBody(),
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: 'Name',
+ itemCls: 'required' //this label will be styled
+ },{
+ xtype: 'textfield',
+ fieldLabel: 'Favorite Color'
+ }]
});
| Component | | itemId : StringAn itemId can be used as an alternative way to get a reference to a component
when no object reference is available. ... An itemId can be used as an alternative way to get a reference to a component
when no object reference is available. Instead of using an id with
@@ -280,7 +295,7 @@ Ext.DomObserver = Ext.extend(Object, {
typeAhead: true,
mode: 'local',
triggerAction: 'all'
-}); | Observable | | overCls : StringAn optional extra CSS class that will be added to this component's Element when the mouse moves
+}); | Observable | | offsets : ArrayThe offsets to use when aligning (see Ext.Element.alignTo for more details. Defaults to [0, 0]. | Editor | | overCls : StringAn optional extra CSS class that will be added to this component's Element when the mouse moves
over the Element, and... An optional extra CSS class that will be added to this component's Element when the mouse moves
over the Element, and removed when the mouse moves out. (defaults to ''). This can be
useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules. | Component | | plugins : Object/ArrayAn object or array of objects that will provide custom functionality for this component. The only
@@ -297,9 +312,9 @@ object. The ptype will be looked up at render time up to determine
type of Plugin to create.
If you create your own Plugins, you may register them using
Ext.ComponentMgr.registerPlugin in order to be able to
-take advantage of lazy instantiation and rendering. | Component | | ref : StringA path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named r... A path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named reference to this Component.
+take advantage of lazy instantiation and rendering. | Component | | ref : StringA path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named r... A path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named reference to this Component.
The ancestor axis can be traversed by using '/' characters in the path.
For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar: var myGrid = new Ext.grid.EditorGridPanel({
title: 'My EditorGridPanel',
@@ -318,9 +333,10 @@ For example, to put a reference to a Toolbar Button into the Panel which owns
}
}
});
- In the code above, if the ref had been 'saveButton' the reference would
-have been placed into the Toolbar. Each '/' in the ref moves up one level from the
-Component's ownerCt. | Component | | renderTo : MixedSpecify the id of the element, a DOM element or an existing Element that this component
+ In the code above, if the ref had been 'saveButton'
+the reference would have been placed into the Toolbar. Each '/' in the ref
+moves up one level from the Component's ownerCt .
+ Also see the added and removed events. | Component | | renderTo : MixedSpecify the id of the element, a DOM element or an existing Element that this component
will be rendered into.
Notes ... Specify the id of the element, a DOM element or an existing Element that this component
will be rendered into.
@@ -405,7 +421,16 @@ Ext.Element.ap... A custom style specification to be appl
}
})
]
-}); | Component | | swallowKeys : Boolean Handle the keydown/keypress events so they don't propagate (defaults to true) | Editor | | updateEl : Boolean True to update the innerHTML of the bound element when the update completes (defaults to false) | Editor | | value : Mixed The data value of the underlying field (defaults to "") | Editor | | xtype : StringThe registered xtype to create. This config option is not used when passing
+}); | Component | | swallowKeys : Boolean Handle the keydown/keypress events so they don't propagate (defaults to true) | Editor | | tpl : MixedAn Ext.Template, Ext.XTemplate
+or an array of strings to form an Ext.XTemplate.
+Used in conjunction with the data and... | Component | | tplWriteMode : StringThe Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.X... The Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.XTemplate.overwrite ). | Component | | updateEl : Boolean True to update the innerHTML of the bound element when the update completes (defaults to false) | Editor | | value : Mixed The data value of the underlying field (defaults to "") | Editor | | xtype : StringThe registered xtype to create. This config option is not used when passing
a config object into a constructor. This ... The registered xtype to create. This config option is not used when passing
a config object into a constructor. This config option is used only when
lazy instantiation is being used, and a child item of a Container is being
@@ -433,15 +458,19 @@ config for a suggestion, or use a render listener directly: new
single: true // Remove the listener after first invocation
}
});
- See also getEl | Component | | hidden : Boolean True if this component is hidden. Read-only. | Component | | initialConfig : Object This Component's initial configuration specification. Read-only. | Component | | ownerCt : Ext.ContainerThe component's owner Ext.Container (defaults to undefined, and is set automatically when
-the component is added to a... The component's owner Ext.Container (defaults to undefined, and is set automatically when
-the component is added to a container). Read-only.
- Note: to access items within the container see itemId. | Component | | rendered : Boolean True if this component has been rendered. Read-only. | Component |
Public Methods|
| Editor( Object config )
- Create a new Editor Create a new Editor Parameters:config : ObjectThe config object Returns: | Editor | | addClass( string cls )
+See also getEl | Component | | hidden : Boolean True if this component is hidden. Read-only. | Component | | initialConfig : Object This Component's initial configuration specification. Read-only. | Component | | ownerCt : Ext.ContainerThis Component's owner Container (defaults to undefined, and is set automatically when
+this Component is added to a C... This Component's owner Container (defaults to undefined, and is set automatically when
+this Component is added to a Container). Read-only.
+ Note: to access items within the Container see itemId. | Component | | refOwner : Ext.ContainerThe ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has... The ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has been configured with a ref . | Component | | rendered : Boolean True if this component has been rendered. Read-only. | Component |
Public Methods|
| Editor( Object config )
+ Create a new Editor Create a new Editor Parameters:config : ObjectThe config object Returns: | Editor | | addClass( string cls )
:
- Ext.ComponentAdds a CSS class to the component's underlying element. Adds a CSS class to the component's underlying element. | Component | | addEvents( Object object )
+ Ext.ComponentAdds a CSS class to the component's underlying element. Adds a CSS class to the component's underlying element. | Component | | addEvents( Object|String o , string Optional. )
:
- voidUsed to define events on this Observable Used to define events on this Observable | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. scope : Object(optional) The scope (this reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration.
@@ -462,8 +491,8 @@ Using the options argument, it is possible to combine different types of listene
A delayed, one-time listener.
myDataView.on('click', this.onClick, this, {
- single: true,
- delay: 100
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
@@ -471,27 +500,27 @@ The method also allows for a single argument to be passed which is a config obje
which specify multiple handlers.
myGridPanel.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
myGridPanel.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
});
Returns: | Observable | | applyToMarkup( String/HTMLElement el )
:
voidApply this component to existing markup that is valid. With this function, no call to render() is required. Apply this component to existing markup that is valid. With this function, no call to render() is required. | Component | | cancelEdit( Boolean remainVisible )
@@ -514,9 +543,41 @@ should usually not need to be called directly.Disable this component and fire the 'disable' event. Disable this component and fire the 'disable' event. | Component | | enable()
:
- Ext.ComponentEnable this component and fire the 'enable' event. Enable this component and fire the 'enable' event. | Component | | enableBubble( Object events )
- :
- voidUsed to enable bubbling of events Used to enable bubbling of events | Observable | | findParentBy( Function fn )
+ Ext.ComponentEnable this component and fire the 'enable' event. Enable this component and fire the 'enable' event. | Component | | enableBubble( String/Array events )
+ :
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present. There is no implementation in the Observable base class.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
| Observable | | findParentBy( Function fn )
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
true, the con... Find a container above this component at any level by a custom function. If the passed function returns
@@ -599,7 +660,26 @@ to participate in determination of inherited xtypes.
var isText = t.isXType( 'textfield'); // true
var isBoxSubclass = t.isXType( 'box'); // true, descended from BoxComponent
var isBoxInstance = t.isXType( 'box', true); // false, not a direct BoxComponent instanceParameters:xtype : StringThe xtype to check for this Component shallow : Boolean(optional) False to check whether this Component is descended from the xtype (this is
-the default), or true to check whether this Component is directly of the specified xtype. Returns: | Component | | nextSibling()
+the default), or true to check whether this Component is directly of the specified xtype.Returns: | Component | | mon( Observable|Element item , Object|String ename , Function fn , Object scope , Object opt )
+ :
+ voidAdds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroye... Adds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroyed. Usage:
+myGridPanel.mon(myGridPanel.getSelectionModel(), 'selectionchange', handleSelectionChange, null, {buffer: 50});
+
+ or:
+myGridPanel.mon(myGridPanel.getSelectionModel(), {
+ selectionchange: handleSelectionChange,
+ buffer: 50
+});
+
Parameters:item : Observable|ElementThe item to which to add a listener/listeners. ename : Object|StringThe event name, or an object containing event name properties. fn : FunctionOptional. If the ename parameter was an event name, this
+is the handler function. scope : ObjectOptional. If the ename parameter was an event name, this
+is the scope (this reference) in which the handler function is executed. opt : ObjectOptional. If the ename parameter was an event name, this
+is the addListener options. Returns: | Component | | mun( Observable|Element item , Object|String ename , Function fn , Object scope )
+ :
+ voidRemoves listeners that were added by the mon method. Removes listeners that were added by the mon method. Parameters:item : Observable|ElementThe item from which to remove a listener/listeners. ename : Object|StringThe event name, or an object containing event name properties. fn : FunctionOptional. If the ename parameter was an event name, this
+is the handler function. scope : ObjectOptional. If the ename parameter was an event name, this
+is the scope (this reference) in which the handler function is executed. Returns: | Component | | nextSibling()
:
Ext.ComponentReturns the next component in the owning container Returns the next component in the owning container | Component | | on( String eventName , Function handler , [Object scope ], [Object options ] )
:
@@ -608,9 +688,9 @@ the default), or true to check whether this Component is directly of the specifi
:
Ext.ComponentReturns the previous component in the owning container Returns the previous component in the owning container | Component | | purgeListeners()
:
- voidRemoves all listeners for this object Removes all listeners for this object | Observable | | realign()
+ voidRemoves all listeners for this object Removes all listeners for this object | Observable | | realign( [Boolean autoSize ] )
:
- voidRealigns the editor to the bound field based on the current alignment config value. Realigns the editor to the bound field based on the current alignment config value. | Editor | | relayEvents( Object o , Array events )
+ voidRealigns the editor to the bound field based on the current alignment config value. Realigns the editor to the bound field based on the current alignment config value. | Editor | | relayEvents( Object o , Array events )
:
voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable | | removeClass( string cls )
:
@@ -667,7 +747,14 @@ to the innerHTML of el.Returns:- void
Suspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:queueSuspended : BooleanPass as true to queue up suspended events to be fired
after the resumeEvents call instead of discarding all suspended events; Returns:
| Observable | | un( String eventName , Function handler , [Object scope ] )
:
- voidRemoves an event handler (shorthand for removeListener.) | Observable |
Public Events|
| afterrender :
+ voidRemoves an event handler (shorthand for removeListener.) | Observable | | update( Mixed htmlOrData , [Boolean loadScripts ], [Function callback ] )
+ :
+ voidUpdate the content area of a component. Update the content area of a component. Parameters:htmlOrData : MixedIf this component has been configured with a template via the tpl config
+then it will use this argument as data to populate the template.
+If this component was not configured with a template, the components
+content area will be updated via Ext.Element update loadScripts : Boolean(optional) Only legitimate when using the html configuration. Defaults to false callback : Function(optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading Returns: | Component |
Public Events|
| added :
+ ( Ext.Component this , Ext.Container ownerCt , number index )
+ Fires when a component is added to an Ext.Container Fires when a component is added to an Ext.Container Listeners will be called with the following arguments: | Component | | afterrender :
( Ext.Component this )
Fires after the component rendering is finished.
The afterrender event is fired after this Component has been rendere... Fires after the component rendering is finished.
@@ -721,7 +808,9 @@ has a null implementation. | Fires after the component is hidden.
Fires after the component is hidden when calling the hide method. Fires after the component is hidden.
-Fires after the component is hidden when calling the hide method. Listeners will be called with the following arguments: | Component | | render :
+Fires after the component is hidden when calling the hide method.Listeners will be called with the following arguments: | Component | | removed :
+ ( Ext.Component this , Ext.Container ownerCt )
+ Fires when a component is removed from an Ext.Container Fires when a component is removed from an Ext.Container Listeners will be called with the following arguments: | Component | | render :
( Ext.Component this )
Fires after the component markup is rendered. Fires after the component markup is rendered. Listeners will be called with the following arguments: | Component | | show :
( Ext.Component this )
|
|