/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_StoreMgr({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.MixedCollection","uses":[],"html":"
Hierarchy
Ext.util.ObservableExt.util.MixedCollectionExt.StoreMgrFiles
The default global group of stores.
\nSpecify true if the addAll\nfunction should add function references to the collection. Defaults to\nfalse.
\nDefaults to: false
Specify true if the addAll\nfunction should add function references to the collection. Defaults to\nfalse.
\nA function that can accept an item of the type(s) stored in this MixedCollection\nand return the key value for that item. This is used when available to look up the key on items that\nwere passed without an explicit key parameter to a MixedCollection method. Passing this parameter is\nequivalent to providing an implementation for the getKey method.
\nPerforms the actual sorting based on a direction and a sorting function. Internally,\nthis creates a temporary array of all items in the MixedCollection, sorts it and then writes\nthe sorted array data back into this.items and this.keys
\nAdds an item to the collection. Fires the add event when complete.
\nThe key to associate with the item, or the new item.
\n\n\nIf a getKey implementation was specified for this MixedCollection,\nor if the key of the stored items is in a property called id,\nthe MixedCollection will be able to derive the key for the new item.\nIn this case just pass the new item in this parameter.
\n\nThe item to add.
\nThe item added.
\nAdds all elements of an Array or an Object to the collection.
\nAn Object containing properties which will be added\nto the collection, or an Array of values, each of which are added to the collection.\nFunctions references will be added to the collection if allowFunctions
\nhas been set to true.
Adds the specified events to the list of events which this Observable may fire.
\nEither an object with event names as properties with a value of true
\nor the first event name string if multiple event names are being passed as separate parameters.
. Event name if multiple event names are being passed as separate parameters.\nUsage:
\n\nthis.addEvents('storeloaded', 'storecleared');\n
\n\nAppends an event handler to this object.
\nThe name of the event to listen for.
\nThe method the event invokes.
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.\nproperties. This may contain any of the following properties:
this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.\nCombining Options
\nUsing the options argument, it is possible to combine different types of listeners:
\n
\nA delayed, one-time listener.\n
myDataView.on('click', this.onClick, this, {\nsingle: true,\ndelay: 100\n});
\n\nAttaching multiple handlers in 1 call
\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n
\n
myGridPanel.on({\n'click' : {\n fn: this.onClick,\n scope: this,\n delay: 100\n},\n'mouseover' : {\n fn: this.onMouseOver,\n scope: this\n},\n'mouseout' : {\n fn: this.onMouseOut,\n scope: this\n}\n});
\n\nOr a shorthand syntax:
\n
myGridPanel.on({\n'click' : this.onClick,\n'mouseover' : this.onMouseOver,\n'mouseout' : this.onMouseOut,\n scope: this\n});
\n\nRemoves all items from the collection. Fires the clear event when complete.
\nCreates a shallow copy of this collection
\nReturns true if the collection contains the passed Object as an item.
\nThe Object to look for in the collection.
\nTrue if the collection contains the Object as an item.
\nReturns true if the collection contains the passed Object as a key.
\nThe key to look for in the collection.
\nTrue if the collection contains the Object as a key.
\nReturns a regular expression based on the given value and matching options. This is used internally for finding and filtering,\nand by Ext.data.Store.filter
\nThe value to create the regex for. This is escaped using Ext.escapeRe
\nTrue to allow any match - no regex start/end line anchors will be added. Defaults to false
\nTrue to make the regex case sensitive (adds 'i' switch to regex). Defaults to false.
\nTrue to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true.
\nExecutes the specified function once for every item in the collection, passing the following arguments:
\n\nThe collection item
The item's index
The total number of items in the collection
The function should return a boolean value. Returning false from the function will stop the iteration.
\nThe function to execute for each item.
\nThe scope (this
reference) in which the function is executed. Defaults to the current item in the iteration.
Executes the specified function once for every key in the collection, passing each\nkey, and its associated item as the first two parameters.
\nThe function to execute for each item.
\nThe scope (this
reference) in which the function is executed. Defaults to the browser window.
Enables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.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\nimplementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\naccess the required target more quickly.
\n\n\nExample:
\n\n\nExt.override(Ext.form.Field, {\n // Add functionality to Field's initComponent to enable the change event to bubble\n initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {\n this.enableBubble('change');\n }),\n\n // We know that we want Field's events to bubble directly to the FormPanel.\n getBubbleTarget : function() {\n if (!this.formPanel) {\n this.formPanel = this.findParentByType('form');\n }\n return this.formPanel;\n }\n});\n\nvar myForm = new Ext.formPanel({\n title: 'User Details',\n items: [{\n ...\n }],\n listeners: {\n change: function() {\n // Title goes red if form has been modified.\n myForm.header.setStyle('color', 'red');\n }\n }\n});\n
\n\nFilter the objects in this collection by a specific property.\nReturns a new collection that has been filtered.
\nA property on your objects
\nEither string that the property values\nshould start with or a RegExp to test against the property
\nTrue to match any part of the string, not just the beginning
\nTrue for case sensitive comparison (defaults to False).
\nThe new filtered collection
\nFilter by a function. Returns a new collection that has been filtered.\nThe passed function will be called with each object in the collection.\nIf the function returns true, the value is included otherwise it is filtered.
\nThe function to be called, it will receive the args o (the object), k (the key)
\nThe scope (this
reference) in which the function is executed. Defaults to this MixedCollection.
The new filtered collection
\nReturns the first item in the collection which elicits a true return value from the\npassed selection function.
\nThe selection function to execute for each item.
\nThe scope (this
reference) in which the function is executed. Defaults to the browser window.
The first item in the collection which returned true from the selection function.
\nFinds the index of the first matching object in this collection by a specific property/value.
\nThe name of a property on your objects.
\nA string that the property values\nshould start with or a RegExp to test against the property.
\nThe index to start searching at (defaults to 0).
\nTrue to match any part of the string, not just the beginning.
\nTrue for case sensitive comparison.
\nThe matched index or -1
\nFind the index of the first matching object in this collection by a function.\nIf the function returns true it is considered a match.
\nThe function to be called, it will receive the args o (the object), k (the key).
\nThe scope (this
reference) in which the function is executed. Defaults to this MixedCollection.
The index to start searching at (defaults to 0).
\nThe matched index or -1
\nFires the specified event with the passed parameters (minus the event name).
\n\n\nAn event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget)\nby calling enableBubble.
\n\nThe name of the event to fire.
\nVariable number of parameters are passed to handlers.
\nreturns false if any of the handlers return false otherwise it returns true.
\nReturns the first item in the collection.
\nthe first item in the collection..
\nThis method calls item().\nReturns the item associated with the passed key OR index. Key has priority\nover index. This is the equivalent of calling key first, then if\nnothing matched calling itemAt.
\nIf the item is found, returns the item. If the item was\nnot found, returns undefined. If an item was found, but is a Class,\nreturns null.
\nReturns the number of items in the collection.
\nthe number of items in the collection.
\nMixedCollection has a generic way to fetch keys if you implement getKey. The default implementation\nsimply returns item.id
but you can provide your own implementation\nto return a different value as in the following examples:
// normal way\nvar mc = new Ext.util.MixedCollection();\nmc.add(someEl.dom.id, someEl);\nmc.add(otherEl.dom.id, otherEl);\n//and so on\n\n// using getKey\nvar mc = new Ext.util.MixedCollection();\nmc.getKey = function(el){\n return el.dom.id;\n};\nmc.add(someEl);\nmc.add(otherEl);\n\n// or via the constructor\nvar mc = new Ext.util.MixedCollection(false, function(el){\n return el.dom.id;\n});\nmc.add(someEl);\nmc.add(otherEl);\n
\n\nThe item for which to find the key.
\nThe key for the passed item.
\nChecks to see if this object has any listeners for a specified event
\nThe name of the event to check for
\nTrue if the event is being listened for, else false
\nReturns index within the collection of the passed Object.
\nThe item to find the index of.
\nindex of the item. Returns -1 if not found.
\nInserts an item at the specified index in the collection. Fires the add event when complete.
\nThe index to insert the item at.
\nThe key to associate with the new item, or the item itself.
\nIf the second parameter was a key, the new item.
\nThe item inserted.
\nReturns the item associated with the passed key OR index.\nKey has priority over index. This is the equivalent\nof calling key first, then if nothing matched calling itemAt.
\nIf the item is found, returns the item. If the item was not found, returns undefined.\nIf an item was found, but is a Class, returns null.
\nReturns the item at the specified index.
\nThe index of the item.
\nThe item at the specified index.
\nReturns the last item in the collection.
\nthe last item in the collection..
\nGets a registered Store by id
\nThe id of the Store, or a Store instance
\nAppends an event handler to this object (shorthand for addListener.)
\nThe type of event to listen for
\nThe method the event invokes
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.
\nRegisters one or more Stores with the StoreMgr. You do not normally need to register stores\nmanually. Any store initialized with a Ext.data.Store.storeId will be auto-registered.
\nAny number of Store instances
\nRelays selected events from the specified Observable as if the events were fired by this.
\nThe Observable whose events this object is to relay.
\nArray of event names to relay.
\nRemove an item from the collection.
\nThe item to remove.
\nThe item removed or false if no item was removed.
\nRemoved an item associated with the passed key fom the collection.
\nThe key of the item to remove.
\nThe item removed or false if no item was removed.
\nRemoves an event handler.
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nReorders each of the items based on a mapping from old index to new index. Internally this\njust translates into a sort. The 'sort' event is fired whenever reordering has occured.
\nMapping from old item index to new item index
\nReplaces an item in the collection. Fires the replace event when complete.
\nThe key associated with the item to replace, or the replacement item.
\n\n\nIf you supplied a getKey implementation for this MixedCollection, or if the key\nof your stored items is in a property called id, then the MixedCollection\nwill be able to derive the key of the replacement item. If you want to replace an item\nwith one having the same key value, then just pass the replacement item in this parameter.
\n\n{Object} o (optional) If the first parameter passed was a key, the item to associate\nwith that key.
\nThe new item.
\nResume firing events. (see suspendEvents)\nIf events were suspended using the queueSuspended parameter, then all\nevents fired during event suspension will be sent to any listeners now.
\nSuspend the firing of all events. (see resumeEvents)
\nPass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events;
\nRemoves an event handler (shorthand for removeListener.)
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nUnregisters one or more Stores with the StoreMgr
\nIDs of the Stores, or Store instances
\n