X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/output/Ext.data.MemoryProxy.html?ds=inline diff --git a/docs/output/Ext.data.MemoryProxy.html b/docs/output/Ext.data.MemoryProxy.html index ca3cd23f..c59d1e3d 100644 --- a/docs/output/Ext.data.MemoryProxy.html +++ b/docs/output/Ext.data.MemoryProxy.html @@ -1,4 +1,4 @@ -
Observable DataProxy MemoryProxy
Package: | Ext.data |
Defined In: | MemoryProxy.js |
Class: | MemoryProxy |
Extends: | DataProxy |
Observable DataProxy MemoryProxy
Package: | Ext.data |
Defined In: | MemoryProxy.js |
Class: | MemoryProxy |
Extends: | DataProxy |
Config Options | Defined By | |
---|---|---|
api : Object Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
Defaults to:api: {
read ... Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
@@ -8,6 +8,24 @@ Defaults to:
+The url is built based upon the action being executed [load|create|save|destroy] +using the commensurate api property, or if undefined default to the +configured Ext.data.Store.url. + For example: +
If the specific URL for a given CRUD action is undefined, the CRUD action request will be directed to the configured url. Note: To modify the URL for an action dynamically the appropriate API @@ -24,22 +42,9 @@ myStore.on({ // permanent, applying this URL for all subsequent requests. store.proxy.setUrl('changed1.php', true); - // manually set the private connection URL. - // Warning: Accessing the private URL property should be avoided. - // Use the public method setUrl instead, shown above. - // It should be noted that changing the URL like this will affect - // the URL for just this request. Subsequent requests will use the - // API or URL defined in your initial proxy configuration. - store.proxy.conn.url = 'changed1.php'; - - // proxy URL will be superseded by API (only if proxy created to use ajax): - // It should be noted that proxy API changes are permanent and will - // be used for all subsequent requests. - store.proxy.api.load = 'changed2.php'; - - // However, altering the proxy API should be done using the public - // method setApi instead. - store.proxy.setApi('load', 'changed2.php'); + // Altering the proxy API should be done using the public + // method setApi. + store.proxy.setApi('read', 'changed2.php'); // Or set the entire API with a config-object. // When using the config-object option, you must redefine the entire @@ -53,9 +58,9 @@ myStore.on({ } } }); - | DataProxy | |
doRequest : Function Abstract method that should be implemented in all subclasses
+ | DataProxy | |
doRequest : Function Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers.
... Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers.
(e.g.: HttpProxy.doRequest,
-DirectProxy.doRequest). | DataProxy | |
listeners : Object A config object containing one or more event handlers to be added to this
+DirectProxy.doRequest). | DataProxy | |
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. @@ -110,7 +115,7 @@ Ext.DomObserver = Ext.extend(Object, { typeAhead: true, mode: 'local', triggerAction: 'all' -}); | Observable | |
restful : Boolean Defaults to false. Set to true to operate in a RESTful manner.
+}); | Observable | |
onRead : Function Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. ... Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for read action. | DataProxy | |
onWrite : Function Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. ... Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for create, update and destroy actions. | DataProxy | |
restful : Boolean Defaults to false. Set to true to operate in a RESTful manner.
Note: this parameter will automatically be set to t... Defaults to false. Set to true to operate in a RESTful manner. Note: this parameter will automatically be set to true if the
Ext.data.Store it is plugged into is set to @@ -131,10 +136,22 @@ POST /users create GET /users read PUT /users/23 update DESTROY /users/23 delete - | DataProxy |
Method | Defined By | |
---|---|---|
MemoryProxy( Object data )
- Parameters:
| MemoryProxy | |
addEvents( Object object )
+
+If set to true, a non-phantom record's +id will be appended to the url. Some MVC (e.g., Ruby on Rails, +Merb and Django) support segment based urls where the segments in the URL follow the +Model-View-Controller approach:
+Where the segments in the url are typically:
Refer to | DataProxy |
Method | Defined By | |
---|---|---|
MemoryProxy( Object data )
+ Parameters:
| MemoryProxy | |
addEvents( Object|String o , string Optional. )
:
- voidUsed to define events on this Observable Used to define events on this Observable Parameters:
| 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. 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 | |
destroy()
:
void Destroys the proxy by purging any event listeners and cancelling any active requests. Destroys the proxy by purging any event listeners and cancelling any active requests. Parameters:
| DataProxy | |
doRequest( String action , Ext.data.Record/Ext.data.Record[] rs , Object params , Ext.data.DataReader reader , Function callback , Object scope , Object arg )
@@ -196,9 +213,41 @@ The function must be passed
scope : ObjectThe scope in which to call the callback arg : ObjectAn optional argument which is passed to the callback as its second parameter.
| MemoryProxy | |
enableBubble( Object events )
+scope : ObjectThe scope ( this reference) in which the callback function is executed. Defaults to the browser window.arg : ObjectAn optional argument which is passed to the callback as its second parameter.
| MemoryProxy | |
enableBubble( String/Array events )
:
- voidUsed to enable bubbling of events Used to enable bubbling of events Parameters:
| Observable | |
fireEvent( String eventName , Object... args )
+ 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). @@ -224,7 +273,7 @@ the corresponding code for CRUD action.Param
:
void Removes an event handler. Removes an event handler. Parameters:
| Observable | |
request( String action , Ext.data.Record/Ext.data.Record[]/null rs , Object params , Ext.data.DataReader reader , Function callback , Object scope , Object options )
:
- voidAll proxy actions are executed through this method. Automatically fires the "before" + action event All proxy actions are executed through this method. Automatically fires the "before" + action event Parameters:
| DataProxy | |
resumeEvents()
+ void All proxy actions are executed through this method. Automatically fires the "before" + action event All proxy actions are executed through this method. Automatically fires the "before" + action event Parameters:
| DataProxy | |
resumeEvents()
:
void Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
@@ -250,15 +299,20 @@ after the Fires before a request to retrieve a data object. Fires before a request to retrieve a data object. Listeners will be called with the following arguments:
| DataProxy | |
beforewrite :
( DataProxy this , String action , Record/Array[Record] rs , Object params )
- Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy Listeners will be called with the following arguments:
| DataProxy | |
exception :
+ Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy
+In addition to... Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy +In addition to being fired through the DataProxy instance that raised the event, this event is also fired +through the Ext.data.DataProxy class to allow for centralized processing of beforewrite events from all +DataProxies by attaching a listener to the Ext.data.Proxy class itself. Listeners will be called with the following arguments:
| DataProxy | |
exception :
( DataProxy this , String type , String action , Object options , Object response , Mixed arg )
- Fires if an exception occurs in the Proxy during a remote request.
-This event is relayed through a corresponding
-Ex... Fires if an exception occurs in the Proxy during a remote request. -This event is relayed through a corresponding -Ext.data.Store.exception, -so any Store instance may observe this event. -This event can be fired for one of two reasons: +Fires if an exception occurs in the Proxy during a remote request. This event is relayed
+through a corresponding Ext... Fires if an exception occurs in the Proxy during a remote request. This event is relayed +through a corresponding Ext.data.Store.exception, +so any Store instance may observe this event. +In addition to being fired through the DataProxy instance that raised the event, this event is also fired +through the Ext.data.DataProxy class to allow for centralized processing of exception events from all +DataProxies by attaching a listener to the Ext.data.Proxy class itself. +This event can be fired for one of two reasons:
| MemoryProxy | |
write :
( DataProxy this , String action , Object data , Object response , Record/Record{} rs , Object options )
- Fires before the request-callback is called Fires before the request-callback is called Listeners will be called with the following arguments:
| DataProxy |
Fires before the request-callback is called
+In addition to being fired through the DataProxy instance that raised the event, this event is also fired +through the Ext.data.DataProxy class to allow for centralized processing of write events from all +DataProxies by attaching a listener to the Ext.data.Proxy class itself.
this
: DataProxyaction
: Stringdata
: Objectresponse
: Objectrs
: Record/Record{}options
: Object