X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/output/Ext.data.ScriptTagProxy.html diff --git a/docs/output/Ext.data.ScriptTagProxy.html b/docs/output/Ext.data.ScriptTagProxy.html index e6554590..da235334 100644 --- a/docs/output/Ext.data.ScriptTagProxy.html +++ b/docs/output/Ext.data.ScriptTagProxy.html @@ -1,4 +1,4 @@ -
Observable DataProxy ScriptTagProxy
Package: | Ext.data |
Defined In: | ScriptTagProxy.js |
Class: | ScriptTagProxy |
Extends: | DataProxy |
Observable DataProxy ScriptTagProxy
Package: | Ext.data |
Defined In: | ScriptTagProxy.js |
Class: | ScriptTagProxy |
Extends: | DataProxy |
Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain @@ -27,6 +27,19 @@ Writer out = response.getWriter(); out.print(dataBlock.toJsonString()); if (scriptTag) { out.write(");"); +} +
Below is a PHP example to do the same thing:
$callback = $_REQUEST['callback'];
+
+// Create the output object.
+$output = array('a' => 'Apple', 'b' => 'Banana');
+
+//start output
+if ($callback) {
+ header('Content-Type: text/javascript');
+ echo $callback . '(' . json_encode($output) . ');';
+} else {
+ header('Content-Type: application/x-json');
+ echo json_encode($output);
}
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".
@@ -90,9 +103,9 @@ myStore.on({
the server the name of the callback function set up by t... The name of the parameter to pass to the server which tells
the server the name of the callback function set up by the load call to process the returned data object.
Defaults to "callback". The server-side processing must read this parameter value, and generate -javascript output which calls this named function passing the data object as its only parameter. | ScriptTagProxy | |
doRequest : Function Abstract method that should be implemented in all subclasses
+javascript output which calls this named function passing the data object as its only parameter. | ScriptTagProxy | |
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. @@ -148,7 +161,7 @@ Ext.DomObserver = Ext.extend(Object, { mode: 'local', triggerAction: 'all' }); | Observable | |
nocache : Boolean Defaults to true. Disable caching by adding a unique parameter
-name to the request. | ScriptTagProxy | |
restful : Boolean Defaults to false. Set to true to operate in a RESTful manner.
+name to the request. | ScriptTagProxy | |
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
scope : ObjectThe scope in which to call the callback arg : ObjectAn optional argument which is passed to the callback as its second parameter.
| ScriptTagProxy | |
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.
| ScriptTagProxy | |
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 @@ -257,13 +270,13 @@ this.getBubbleTarget() if present... Enables events fi 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 )
+});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). @@ -300,7 +313,11 @@ the corresponding code for CRUD action.Param
void Deprecated load method using old method signature. See {@doRequest} for preferred method. Deprecated load method using old method signature. See {@doRequest} for preferred method. Parameters:
| DataProxy | |
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 | |
purgeListeners()
+If omitted, defaults to the object which fired the event.options : Object(optional) An object containing handler configuration.
| Observable | |
onRead( String action , Object trans , Object res )
+ :
+ voidCallback for read actions Callback for read actions Parameters:
| ScriptTagProxy | |
onWrite( String action , Object trans , Object res )
+ :
+ voidCallback for write actions Callback for write actions Parameters:
| ScriptTagProxy | |
purgeListeners()
:
void Removes all listeners for this object Removes all listeners for this object Parameters:
| Observable | |
relayEvents( Object o , Array events )
:
@@ -308,7 +325,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
|