| applyTo : MixedSpecify the id of the element, a DOM element or an existing Element corresponding to a DIV
+ A popup date picker. This class is used by the DateField class
+to allow browsing and selection of valid dates.
+ All the string values documented below may be overridden by including an Ext locale file in
+your page. Config Options|
| 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.
@@ -21,7 +19,10 @@ element's parent node will automatically be used as the component's container.
| 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 | | cancelText : String The text to display on the cancel button (defaults to 'Cancel') | DatePicker | | clearCls : StringThe CSS class used to to apply to the special clearing div rendered
+them on render (defaults to false). | Component | | bubbleEvents : ArrayAn array of events that, when fired, should be bubbled to any parent container.
+See Ext.util.Observable.enableBubble.... | Component | | cancelText : String The text to display on the cancel button (defaults to 'Cancel' ) | DatePicker | | 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').
@@ -31,7 +32,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 | | 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 | | 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.
@@ -42,22 +57,23 @@ 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 | | dayNames : Array An array of textual day names which can be overriden for localization support (defaults to Date.dayNames) | DatePicker | | 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 | | disabledDates : ArrayAn array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
-expression so they... An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
-expression so they are very powerful. Some examples:
-
-- ['03/08/2003', '09/16/2003'] would disable those exact dates
-- ['03/08', '09/16'] would disable those days for every year
-- ['^03/08'] would only match the beginning (useful if you are using short years)
-- ['03/../2006'] would disable every day in March 2006
-- ['^03'] would disable every day in every March
-
-Note that the format of the dates included in the array should exactly match the format config.
-In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
-escape the dot when restricting dates. For example: ['03\\.08\\.03']. | DatePicker | | disabledDatesRE : RegExpJavaScript regular expression used to disable a pattern of dates (defaults to null). The disabledDates
-config will ... JavaScript regular expression used to disable a pattern of dates (defaults to null). The disabledDates
-config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
-disabledDates value. | DatePicker | | disabledDatesText : String The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled') | DatePicker | | disabledDays : Array An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null). | DatePicker | | disabledDaysText : String The tooltip to display when the date falls on a disabled day (defaults to 'Disabled') | DatePicker | | 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 | | dayNames : Array An array of textual day names which can be overriden for localization support (defaults to Date.dayNames) | DatePicker | | 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 | | disabledDates : ArrayAn array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
+expression so they ... An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
+expression so they are very powerful. Some examples:
+
+- ['03/08/2003', '09/16/2003'] would disable those exact dates
+- ['03/08', '09/16'] would disable those days for every year
+- ['^03/08'] would only match the beginning (useful if you are using short years)
+- ['03/../2006'] would disable every day in March 2006
+- ['^03'] would disable every day in every March
+
+Note that the format of the dates included in the array should exactly match the format config.
+In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
+escape the dot when restricting dates. For example: ['03\\.08\\.03']. | DatePicker | | disabledDatesRE : RegExpJavaScript regular expression used to disable a pattern of dates (defaults to null). The disabledDates
+config will g... JavaScript regular expression used to disable a pattern of dates (defaults to null). The disabledDates
+config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
+disabledDates value. | DatePicker | | disabledDatesText : String The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled' ) | DatePicker | | disabledDays : Array An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null). | DatePicker | | disabledDaysText : String The tooltip to display when the date falls on a disabled day (defaults to 'Disabled' ) | DatePicker | | 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.
@@ -71,13 +87,13 @@ Example use: new Ext.FormPanel({
xtype: 'textfield',
fieldLabel: 'Name'
}]
-});
| Component | | format : StringThe default date format string which can be overriden for localization support. The format must be
-valid according ... The default date format string which can be overriden for localization support. The format must be
-valid according to Date.parseDate (defaults to 'm/d/y'). | DatePicker | | handler : FunctionOptional. A function that will handle the select event of this picker.
-The handler is passed the following parameter... Optional. A function that will handle the select event of this picker.
-The handler is passed the following parameters:
-picker : DatePickerThe Ext.DatePicker.
-date : DateThe selected date.
+}); | Component | | format : StringThe default date format string which can be overriden for localization support. The format must be
+valid according t... The default date format string which can be overriden for localization support. The format must be
+valid according to Date.parseDate (defaults to 'm/d/y' ). | DatePicker | | handler : FunctionOptional. A function that will handle the select event of this picker.
+The handler is passed the following parameters... Optional. A function that will handle the select event of this picker.
+The handler is passed the following parameters:
+picker : DatePickerThis DatePicker.
+date : DateThe selected date.
| DatePicker | | hidden : BooleanRender this component hidden (default is false). If true, the
hide method will be called internally. | Component | | hideLabel : Booleantrue to completely hide the label element
(label and separator). Defaults to false.
@@ -103,7 +119,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).
@@ -113,8 +133,11 @@ rules to style the specific instance of this component uniquely, and also to sel
sub-elements using this component's id as the parent.
Note: to avoid complications imposed by a unique id also see
itemId and ref .
- Note: to access the container of an item see ownerCt . | Component | | 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
+ Note: to access the container of an item see ownerCt . | Component | | 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').
@@ -123,22 +146,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
@@ -267,7 +290,7 @@ Ext.DomObserver = Ext.extend(Object, {
typeAhead: true,
mode: 'local',
triggerAction: 'all'
-}); | Observable | | maxDate : Date Maximum allowable date (JavaScript date object, defaults to null) | DatePicker | | maxText : String The error text to display if the maxDate validation fails (defaults to 'This date is after the maximum date') | DatePicker | | minDate : Date Minimum allowable date (JavaScript date object, defaults to null) | DatePicker | | minText : String The error text to display if the minDate validation fails (defaults to 'This date is before the minimum date') | DatePicker | | monthNames : Array An array of textual month names which can be overriden for localization support (defaults to Date.monthNames) | DatePicker | | monthYearText : String The header month selector tooltip (defaults to 'Choose a month (Control+Up/Down to move years)') | DatePicker | | nextText : String The next month navigation button tooltip (defaults to 'Next Month (Control+Right)') | DatePicker | | okText : String The text to display on the ok button (defaults to ' OK ' to give the user extra clicking room) | DatePicker | | overCls : StringAn optional extra CSS class that will be added to this component's Element when the mouse moves
+}); | Observable | | maxDate : Date Maximum allowable date (JavaScript date object, defaults to null) | DatePicker | | maxText : String The error text to display if the maxDate validation fails (defaults to 'This date is after the maximum date' ) | DatePicker | | minDate : Date Minimum allowable date (JavaScript date object, defaults to null) | DatePicker | | minText : String The error text to display if the minDate validation fails (defaults to 'This date is before the minimum date' ) | DatePicker | | monthNames : Array An array of textual month names which can be overriden for localization support (defaults to Date.monthNames) | DatePicker | | monthYearText : String The header month selector tooltip (defaults to 'Choose a month (Control+Up/Down to move years)' ) | DatePicker | | nextText : String The next month navigation button tooltip (defaults to 'Next Month (Control+Right)' ) | DatePicker | | okText : String The text to display on the ok button (defaults to ' OK ' to give the user extra clicking room) | DatePicker | | 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
@@ -275,7 +298,7 @@ requirement for a ... An object or array of objects that
requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.
When a component is created, if any plugins are available, the component will call the init method on each
plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the
-component as needed to provide its functionality. | Component | | prevText : String The previous month navigation button tooltip (defaults to 'Previous Month (Control+Left)') | DatePicker | | ptype : StringThe registered ptype to create. This config option is not used when passing
+component as needed to provide its functionality. | Component | | prevText : String The previous month navigation button tooltip (defaults to 'Previous Month (Control+Left)' ) | DatePicker | | ptype : StringThe registered ptype to create. This config option is not used when passing
a config object into a constructor. This ... The registered ptype 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 Plugin is being
@@ -284,9 +307,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',
@@ -305,9 +328,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.
@@ -319,10 +343,10 @@ to render and manage its child items.
When using this config, a call to render() is not required.
- See render also. | Component | | scope : ObjectThe scope ( this reference) in which the handler
-function will be called. Defaults to this DatePicker instance. | DatePicker | | showToday : BooleanFalse to hide the footer area containing the Today button and disable the keyboard handler for spacebar
-that selects... False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
-that selects the current date (defaults to true). | DatePicker | | startDay : Number Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) | DatePicker | | stateEvents : ArrayAn array of events that, when fired, should trigger this component to
+ See render also. | Component | | scope : ObjectThe scope ( this reference) in which the handler
+function will be called. Defaults to this DatePicker instance. | DatePicker | | showToday : BooleanFalse to hide the footer area containing the Today button and disable the keyboard handler for spacebar
+that selects ... False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
+that selects the current date (defaults to true ). | DatePicker | | startDay : Number Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) | DatePicker | | stateEvents : ArrayAn array of events that, when fired, should trigger this component to
save its state (defaults to none). stateEvents ... An array of events that, when fired, should trigger this component to
save its state (defaults to none). stateEvents may be any type
of event supported by this component, including browser or custom events
@@ -392,7 +416,19 @@ Ext.Element.ap... A custom style specification to be appl
}
})
]
-}); | Component | | todayText : String The text to display on the button that selects the current date (defaults to 'Today') | DatePicker | | todayTip : String The tooltip to display for the button that selects the current date (defaults to '{current date} (Spacebar)') | DatePicker | | xtype : StringThe registered xtype to create. This config option is not used when passing
+}); | Component | | todayText : String The text to display on the button that selects the current date (defaults to 'Today' ) | DatePicker | | todayTip : StringA string used to format the message for displaying in a tooltip over the button that
+selects the current date. Defaul... A string used to format the message for displaying in a tooltip over the button that
+selects the current date. Defaults to '{0} (Spacebar)' where
+the {0} token is replaced by today's date. | DatePicker | | 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 | | 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
@@ -420,15 +456,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|
| DatePicker( Object config )
- Create a new DatePicker Create a new DatePicker Parameters:config : ObjectThe config object Returns: | DatePicker | | 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|
| DatePicker( Object config )
+ Create a new DatePicker Create a new DatePicker Parameters:config : ObjectThe config object Returns: | DatePicker | | 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.
@@ -449,8 +489,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
@@ -458,30 +498,35 @@ 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 | | cloneConfig( Object overrides )
+ 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 | | bubble( Function fn , [Object scope ], [Array args ] )
+ :
+ Ext.ComponentBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of... Bubbles up the component/container heirarchy, calling the specified function with each component. The scope ( this) of
+function call will be the scope provided or the current component. The arguments to the function
+will be the args provided or the current component. If the function returns false at any point,
+the bubble is stopped. | Component | | cloneConfig( Object overrides )
:
Ext.ComponentClone the current component using the original config values passed into this instance by default. Clone the current component using the original config values passed into this instance by default. | Component | | destroy()
@@ -494,15 +539,49 @@ 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
-true, the container will be returned. | Component | | findParentByType( String/Class xtype )
+true, the container will be returned. | Component | | findParentByType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
- Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class | Component | | fireEvent( String eventName , Object... args )
+ Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class Parameters:xtype : String/Ext.Component/ClassThe xtype to check for this Component. Note that the the component can either be an instance
+or a component class: 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 | | fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... Fires the specified event with the passed parameters (minus the event name).
@@ -566,7 +645,7 @@ false to cancel hiding the component. Fires the 'h... Hi
event after hiding the component. Note this method is called internally if
the component is configured to be hidden . | Component | | isVisible()
:
- BooleanReturns true if this component is visible. Returns true if this component is visible. | Component | | isXType( String xtype , [Boolean shallow ] )
+ BooleanReturns true if this component is visible. Returns true if this component is visible. | Component | | isXType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
BooleanTests whether or not this Component is of a specific xtype. This can test whether this Component is descended
from th... Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
@@ -578,8 +657,31 @@ to participate in determination of inherited xtypes.
var t = new Ext.form.TextField();
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 instance
Parameters: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()
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance | 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 ] )
:
@@ -628,10 +730,10 @@ events fired during event suspension will be sent to any listeners now.Convenience function for setting disabled/enabled by boolean. Convenience function for setting disabled/enabled by boolean. | Component | | setDisabledDates( Array/RegExp disabledDates )
:
- voidReplaces any existing disabled dates with new values and refreshes the DatePicker. Replaces any existing disabled dates with new values and refreshes the DatePicker. Parameters:disabledDates : Array/RegExpAn array of date strings (see the disabledDates config
+ void Replaces any existing disabled dates with new values and refreshes the DatePicker. Replaces any existing disabled dates with new values and refreshes the DatePicker. Parameters:disabledDates : Array/RegExpAn array of date strings (see the disabledDates config
for details on supported values), or a JavaScript regular expression used to disable a pattern of dates. Returns:
| DatePicker | | setDisabledDays( Array disabledDays )
:
- voidReplaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. Parameters:disabledDays : ArrayAn array of disabled day indexes. See the disabledDays config
+ void Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker. Parameters:disabledDays : ArrayAn array of disabled day indexes. See the disabledDays config
for details on supported values. Returns:
| DatePicker | | setMaxDate( Date value )
:
voidReplaces any existing maxDate with the new value and refreshes the DatePicker. Replaces any existing maxDate with the new value and refreshes the DatePicker. | DatePicker | | setMinDate( Date value )
@@ -650,7 +752,14 @@ event after showing the component.Parameters
voidSuspend 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.
@@ -690,11 +799,13 @@ 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 | | select :
( DatePicker this , Date date )
- Fires when a date is selected Fires when a date is selected Listeners will be called with the following arguments:this : DatePickerdate : DateThe selected date
| DatePicker | | show :
+ Fires when a date is selected Fires when a date is selected Listeners will be called with the following arguments:this : DatePickerDatePicker date : DateThe selected date
| DatePicker | | show :
( Ext.Component this )
Fires after the component is shown when calling the show method. Fires after the component is shown when calling the show method. Listeners will be called with the following arguments: | Component | | staterestore :
( Ext.Component this , Object state )
|
|