|
| allowFunctions : BooleanSpecify true if the addAll
function should add function references to the collection. Defaults to
false. | MixedCollection |
| listeners : ObjectA config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this
@@ -150,38 +150,38 @@ The function should return a boolean value. Returning false from the function wi
key, and its associated item as th... Executes the specified function once for every key in the collection, passing each
key, and its associated item as the first two parameters. | MixedCollection |
| 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');
- }
- }
+ 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 |
| filter( String property , String/RegExp value , [Boolean anyMatch ], [Boolean caseSensitive ] )
:
MixedCollectionFilter the objects in this collection by a specific property.
@@ -286,7 +286,11 @@ Defaults to sorting by case insensitive string. Returns:<
:
ObjectRemoved an item associated with the passed key fom the collection. Removed an item associated with the passed key fom the collection. | MixedCollection |
| removeListener( String eventName , Function handler , [Object scope ] )
:
- voidRemoves an event handler. Removes an event handler. | Observable |
| replace( String key , o {Object} )
+ voidRemoves an event handler. Removes an event handler. | Observable |
| reorder( Object mapping )
+ :
+ voidReorders each of the items based on a mapping from old index to new index. Internally this
+just translates into a sor... Reorders each of the items based on a mapping from old index to new index. Internally this
+just translates into a sort. The 'sort' event is fired whenever reordering has occured. | MixedCollection |
| replace( String key , o {Object} )
:
ObjectReplaces an item in the collection. Fires the replace event when complete. Replaces an item in the collection. Fires the replace event when complete. Parameters:key : StringThe key associated with the item to replace, or the replacement item.
If you supplied a getKey implementation for this MixedCollection, or if the key
|