Observable AbstractStore TreeStore
Package: | Ext.data |
Defined In: | TreeStore.js |
Class: | TreeStore |
Extends: | AbstractStore |
A store class that allows the representation of hierarchical data.
Config Options | Defined By | |
---|---|---|
autoLoad : Boolean/Object If data is not specified, and if autoLoad is true or an Object, this store's load method
is automatically called afte... If data is not specified, and if autoLoad is true or an Object, this store's load method
is automatically called after creation. If the value of autoLoad is an Object, this Object will be passed to the store's
load method. Defaults to false. | AbstractStore | |
autoSave : Boolean True to automatically sync the Store with its Proxy after every edit to one of its Records.
Defaults to false. | AbstractStore | |
clearOnLoad : Boolean Default to true. Remove previously existing
child nodes before loading. | TreeStore | |
defaultRootId : String The default root id. Defaults to 'root' | TreeStore | |
listeners : Object A 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 object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from ExtJs Components While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the DataView's
| Observable | |
nodeParam : String The name of the parameter sent to the server which contains
the identifier of the node. Defaults to 'node'. | TreeStore | |
proxy : String/Ext.data.Proxy/Object The Proxy to use for this Store. This can be either a string, a config
object or a Proxy instance - see setProxy for ... The Proxy to use for this Store. This can be either a string, a config
object or a Proxy instance - see setProxy for details. | AbstractStore | |
storeId : String Optional unique identifier for this store. If present, this Store will be registered with
the Ext.StoreMgr, making i... Optional unique identifier for this store. If present, this Store will be registered with
the Ext.StoreMgr, making it easy to reuse elsewhere. Defaults to undefined. | AbstractStore |
Property | Defined By | |
---|---|---|
batchUpdateMode : String Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's
internal... Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's
internal representation of the data after each operation of the batch has completed, 'complete' will wait until
the entire batch has been completed before updating the Store's data. 'complete' is a good choice for local
storage proxies, 'operation' is better for remote proxies, where there is a comparatively high latency. | AbstractStore | |
defaultProxyType : String The string type of the Proxy to create if none is specified. This defaults to creating a memory proxy. | AbstractStore | |
defaultSortDirection : String The default sort direction to use if one is not specified (defaults to "ASC") | AbstractStore | |
filterOnLoad : Boolean If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired.
De... If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired.
Defaults to true, ignored if remoteFilter is true | AbstractStore | |
filters : Ext.util.MixedCollection The collection of Filters currently applied to this Store | AbstractStore | |
isDestroyed : Boolean True if the Store has already been destroyed via destroyStore. If this is true, the reference to Store should be dele... True if the Store has already been destroyed via destroyStore. If this is true, the reference to Store should be deleted
as it will not function correctly any more. | AbstractStore | |
sortOnLoad : Boolean If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired.
De... If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired.
Defaults to true, igored if remoteSort is true | AbstractStore | |
sortToggle : Object Stores the current sort direction ('ASC' or 'DESC') for each field. Used internally to manage the toggling
of sort di... Stores the current sort direction ('ASC' or 'DESC') for each field. Used internally to manage the toggling
of sort direction per field. Read only | AbstractStore | |
sorters : Ext.util.MixedCollection The collection of Sorters currently applied to this Store. | AbstractStore |
Method | Defined By | |
---|---|---|
TreeStore( Object config )
Parameters:
| TreeStore | |
addEvents( Object|String o , string Optional. )
:
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. Parameters:
| 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:
| Observable | |
addManagedListener( Observable|Element item , Object|String ename , Function fn , Object scope , Object opt )
:
voidAdds listeners to any Observable object (or Element) which are automatically removed when this Component
is destroyed... Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. Parameters:
| Observable | |
clearListeners()
:
void Removes all listeners for this object including the managed listeners Removes all listeners for this object including the managed listeners Parameters:
| Observable | |
clearManagedListeners()
:
void Removes all managed listeners for this object. Removes all managed listeners for this object. Parameters:
| Observable | |
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 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:
Parameters:
| Observable | |
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). An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
getNewRecords()
:
Array Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not
yet bee... Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not
yet been saved on this Store (this happens when adding a non-phantom record from another Store into this one) Parameters:
| AbstractStore | |
getNodeById()
:
Ext.data.RecordNode Returns the record node by id Returns the record node by id Parameters:
| TreeStore | |
getProxy()
:
Ext.data.Proxy Returns the proxy currently attached to this proxy instance Returns the proxy currently attached to this proxy instance Parameters:
| AbstractStore | |
getRootNode()
:
Ext.data.RecordNode Returns the root node for this tree. Returns the root node for this tree. Parameters:
| TreeStore | |
getSortState()
:
Object Returns an object describing the current sort state of this Store. Returns an object describing the current sort state of this Store. Parameters:
| AbstractStore | |
getSubStore( Ext.data.RecordNode/Ext.data.Record record )
:
voidReturns a flat Ext.data.Store with the correct type of model. Returns a flat Ext.data.Store with the correct type of model. Parameters:
| TreeStore | |
getUpdatedRecords()
:
Array Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy Parameters:
| AbstractStore | |
hasListener( String eventName )
:
BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event Parameters:
| Observable | |
load( Object options )
:
voidLoads the Store using its configured proxy. Loads the Store using its configured proxy. Parameters:
| AbstractStore | |
on( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:
| Observable | |
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. Parameters:
| Observable | |
removeListener( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler. Removes an event handler. Parameters:
| Observable | |
removeManagedListener( 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:
| Observable | |
resumeEvents()
:
void Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
events fired during event suspension will be sent to any listeners now. Parameters:
| Observable | |
setProxy( String|Object|Ext.data.Proxy proxy )
:
Ext.data.ProxySets the Store's Proxy by string, config object or Proxy instance Sets the Store's Proxy by string, config object or Proxy instance Parameters:
| AbstractStore | |
suspendEvents( Boolean queueSuspended )
:
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
sync()
:
void Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated
and deleted records in ... Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated
and deleted records in the store, updating the Store's internal representation of the records
as each operation completes. Parameters:
| AbstractStore | |
un( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler (shorthand for removeListener.) Removes an event handler (shorthand for removeListener.) Parameters:
| Observable |
Event | Defined By | |
---|---|---|
add :
( Ext.data.Store store , Array records , Number index )
Fired when a Model instance has been added to this Store Fired when a Model instance has been added to this Store Listeners will be called with the following arguments:
| AbstractStore | |
beforeload :
( Ext.data.Store store , Ext.data.Operation operation )
Event description Event description Listeners will be called with the following arguments:
| AbstractStore | |
beforesync :
( Object options )
Called before a call to sync is executed. Return false from any listener to cancel the synv Called before a call to sync is executed. Return false from any listener to cancel the synv Listeners will be called with the following arguments:
| AbstractStore | |
datachanged :
( Ext.data.Store this )
Fires whenever the records in the Store have changed in some way - this could include adding or removing records,
or ... Fires whenever the records in the Store have changed in some way - this could include adding or removing records,
or updating the data in existing records Listeners will be called with the following arguments:
| AbstractStore | |
load :
( Ext.data.store this , Array records , Boolean successful )
Fires whenever the store reads data from a remote data source. Fires whenever the store reads data from a remote data source. Listeners will be called with the following arguments:
| AbstractStore | |
remove :
( Ext.data.Model record )
Fired when a Model instance has been removed from this Store Fired when a Model instance has been removed from this Store Listeners will be called with the following arguments:
| AbstractStore | |
update :
( Store this , Ext.data.Model record , String operation )
Fires when a Record has been updated Fires when a Record has been updated Listeners will be called with the following arguments:
| AbstractStore |