-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-data.proxy.Server'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-data-proxy-Server'>/**
</span> * @author Ed Spencer
* @class Ext.data.proxy.Server
* @extends Ext.data.proxy.Proxy
alternateClassName: 'Ext.data.ServerProxy',
uses : ['Ext.data.Request'],
-<span id='Ext-data.proxy.Server-cfg-url'> /**
+<span id='Ext-data-proxy-Server-cfg-url'> /**
</span> * @cfg {String} url The URL from which to request the data object.
*/
-<span id='Ext-data.proxy.Server-cfg-reader'> /**
+<span id='Ext-data-proxy-Server-cfg-reader'> /**
</span> * @cfg {Object/String/Ext.data.reader.Reader} reader The Ext.data.reader.Reader to use to decode the server's response. This can
* either be a Reader instance, a config object or just a valid Reader type name (e.g. 'json', 'xml').
*/
-<span id='Ext-data.proxy.Server-cfg-writer'> /**
+<span id='Ext-data-proxy-Server-cfg-writer'> /**
</span> * @cfg {Object/String/Ext.data.writer.Writer} writer The Ext.data.writer.Writer to use to encode any request sent to the server.
* This can either be a Writer instance, a config object or just a valid Writer type name (e.g. 'json', 'xml').
*/
-<span id='Ext-data.proxy.Server-cfg-pageParam'> /**
+<span id='Ext-data-proxy-Server-cfg-pageParam'> /**
</span> * @cfg {String} pageParam The name of the 'page' parameter to send in a request. Defaults to 'page'. Set this to
* undefined if you don't want to send a page parameter
*/
pageParam: 'page',
-<span id='Ext-data.proxy.Server-cfg-startParam'> /**
+<span id='Ext-data-proxy-Server-cfg-startParam'> /**
</span> * @cfg {String} startParam The name of the 'start' parameter to send in a request. Defaults to 'start'. Set this
* to undefined if you don't want to send a start parameter
*/
startParam: 'start',
-<span id='Ext-data.proxy.Server-cfg-limitParam'> /**
+<span id='Ext-data-proxy-Server-cfg-limitParam'> /**
</span> * @cfg {String} limitParam The name of the 'limit' parameter to send in a request. Defaults to 'limit'. Set this
* to undefined if you don't want to send a limit parameter
*/
limitParam: 'limit',
-<span id='Ext-data.proxy.Server-cfg-groupParam'> /**
+<span id='Ext-data-proxy-Server-cfg-groupParam'> /**
</span> * @cfg {String} groupParam The name of the 'group' parameter to send in a request. Defaults to 'group'. Set this
* to undefined if you don't want to send a group parameter
*/
groupParam: 'group',
-<span id='Ext-data.proxy.Server-cfg-sortParam'> /**
+<span id='Ext-data-proxy-Server-cfg-sortParam'> /**
</span> * @cfg {String} sortParam The name of the 'sort' parameter to send in a request. Defaults to 'sort'. Set this
* to undefined if you don't want to send a sort parameter
*/
sortParam: 'sort',
-<span id='Ext-data.proxy.Server-cfg-filterParam'> /**
+<span id='Ext-data-proxy-Server-cfg-filterParam'> /**
</span> * @cfg {String} filterParam The name of the 'filter' parameter to send in a request. Defaults to 'filter'. Set
* this to undefined if you don't want to send a filter parameter
*/
filterParam: 'filter',
-<span id='Ext-data.proxy.Server-cfg-directionParam'> /**
+<span id='Ext-data-proxy-Server-cfg-directionParam'> /**
</span> * @cfg {String} directionParam The name of the direction parameter to send in a request. <strong>This is only used when simpleSortMode is set to true.</strong>
* Defaults to 'dir'.
*/
directionParam: 'dir',
-<span id='Ext-data.proxy.Server-cfg-simpleSortMode'> /**
+<span id='Ext-data-proxy-Server-cfg-simpleSortMode'> /**
</span> * @cfg {Boolean} simpleSortMode Enabling simpleSortMode in conjunction with remoteSort will only send one sort property and a direction when a remote sort is requested.
* The directionParam and sortParam will be sent with the property name and either 'ASC' or 'DESC'
*/
simpleSortMode: false,
-<span id='Ext-data.proxy.Server-cfg-noCache'> /**
+<span id='Ext-data-proxy-Server-cfg-noCache'> /**
</span> * @cfg {Boolean} noCache (optional) Defaults to true. Disable caching by adding a unique parameter
* name to the request.
*/
noCache : true,
-<span id='Ext-data.proxy.Server-cfg-cacheString'> /**
+<span id='Ext-data-proxy-Server-cfg-cacheString'> /**
</span> * @cfg {String} cacheString The name of the cache param added to the url when using noCache (defaults to "_dc")
*/
cacheString: "_dc",
-<span id='Ext-data.proxy.Server-cfg-timeout'> /**
+<span id='Ext-data-proxy-Server-cfg-timeout'> /**
</span> * @cfg {Number} timeout (optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
*/
timeout : 30000,
-<span id='Ext-data.proxy.Server-cfg-api'> /**
+<span id='Ext-data-proxy-Server-cfg-api'> /**
</span> * @cfg {Object} api
* Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
* Defaults to:<pre><code>
* will be directed to the configured <tt>{@link Ext.data.proxy.Server#url url}</tt>.</p>
*/
-<span id='Ext-data.proxy.Server-method-constructor'> /**
+<span id='Ext-data-proxy-Server-method-constructor'> /**
</span> * @ignore
*/
constructor: function(config) {
config = config || {};
this.addEvents(
-<span id='Ext-data.proxy.Server-event-exception'> /**
+<span id='Ext-data-proxy-Server-event-exception'> /**
</span> * @event exception
* Fires when the server returns an exception
* @param {Ext.data.proxy.Proxy} this
);
me.callParent([config]);
-<span id='Ext-data.proxy.Server-cfg-extraParams'> /**
+<span id='Ext-data-proxy-Server-cfg-extraParams'> /**
</span> * @cfg {Object} extraParams Extra parameters that will be included on every request. Individual requests with params
* of the same name will override these params when they are in conflict.
*/
return this.doRequest.apply(this, arguments);
},
-<span id='Ext-data.proxy.Server-method-buildRequest'> /**
+<span id='Ext-data-proxy-Server-method-buildRequest'> /**
</span> * Creates and returns an Ext.data.Request object based on the options passed by the {@link Ext.data.Store Store}
* that this Proxy is attached to.
* @param {Ext.data.Operation} operation The {@link Ext.data.Operation Operation} object to execute
return request;
},
-<span id='Ext-data.proxy.Server-method-processResponse'> /**
+<span id='Ext-data-proxy-Server-method-processResponse'> /**
</span> *
*/
processResponse: function(success, operation, request, response, callback, scope){
me.afterRequest(request, success);
},
-<span id='Ext-data.proxy.Server-method-setException'> /**
+<span id='Ext-data-proxy-Server-method-setException'> /**
</span> * Sets up an exception on the operation
* @private
* @param {Ext.data.Operation} operation The operation
});
},
-<span id='Ext-data.proxy.Server-method-extractResponseData'> /**
+<span id='Ext-data-proxy-Server-method-extractResponseData'> /**
</span> * Template method to allow subclasses to specify how to get the response for the reader.
* @private
* @param {Object} response The server response
return response;
},
-<span id='Ext-data.proxy.Server-method-applyEncoding'> /**
+<span id='Ext-data-proxy-Server-method-applyEncoding'> /**
</span> * Encode any values being sent to the server. Can be overridden in subclasses.
* @private
* @param {Array} An array of sorters/filters.
return Ext.encode(value);
},
-<span id='Ext-data.proxy.Server-method-encodeSorters'> /**
+<span id='Ext-data-proxy-Server-method-encodeSorters'> /**
</span> * Encodes the array of {@link Ext.util.Sorter} objects into a string to be sent in the request url. By default,
* this simply JSON-encodes the sorter data
* @param {Array} sorters The array of {@link Ext.util.Sorter Sorter} objects
},
-<span id='Ext-data.proxy.Server-method-encodeFilters'> /**
+<span id='Ext-data-proxy-Server-method-encodeFilters'> /**
</span> * Encodes the array of {@link Ext.util.Filter} objects into a string to be sent in the request url. By default,
* this simply JSON-encodes the filter data
* @param {Array} sorters The array of {@link Ext.util.Filter Filter} objects
return this.applyEncoding(min);
},
-<span id='Ext-data.proxy.Server-method-getParams'> /**
+<span id='Ext-data-proxy-Server-method-getParams'> /**
</span> * @private
* Copy any sorters, filters etc into the params so they can be sent over the wire
*/
return params;
},
-<span id='Ext-data.proxy.Server-method-buildUrl'> /**
+<span id='Ext-data-proxy-Server-method-buildUrl'> /**
</span> * Generates a url based on a given Ext.data.Request object. By default, ServerProxy's buildUrl will
* add the cache-buster param to the end of the url. Subclasses may need to perform additional modifications
* to the url.
return url;
},
-<span id='Ext-data.proxy.Server-method-getUrl'> /**
+<span id='Ext-data-proxy-Server-method-getUrl'> /**
</span> * Get the url for the request taking into account the order of priority,
* - The request
* - The api
return request.url || this.api[request.action] || this.url;
},
-<span id='Ext-data.proxy.Server-method-doRequest'> /**
+<span id='Ext-data-proxy-Server-method-doRequest'> /**
</span> * In ServerProxy subclasses, the {@link #create}, {@link #read}, {@link #update} and {@link #destroy} methods all pass
* through to doRequest. Each ServerProxy subclass must implement the doRequest method - see {@link Ext.data.proxy.JsonP}
* and {@link Ext.data.proxy.Ajax} for examples. This method carries the same signature as each of the methods that delegate to it.
//</debug>
},
-<span id='Ext-data.proxy.Server-property-afterRequest'> /**
+<span id='Ext-data-proxy-Server-method-afterRequest'> /**
</span> * Optional callback function which can be used to clean up after a request has been completed.
* @param {Ext.data.Request} request The Request object
* @param {Boolean} success True if the request was successful
+ * @method
*/
afterRequest: Ext.emptyFn,
Ext.destroy(this.reader, this.writer);
}
});
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>