X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/source/HttpProxy.html diff --git a/docs/source/HttpProxy.html b/docs/source/HttpProxy.html index 6e27e884..5ae9fa82 100644 --- a/docs/source/HttpProxy.html +++ b/docs/source/HttpProxy.html @@ -1,17 +1,12 @@ - - - The source code - - - - -
/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-
/** + + + + The source code + + + + +
/** * @class Ext.data.HttpProxy * @extends Ext.data.DataProxy *

An implementation of {@link Ext.data.DataProxy} that processes data requests within the same @@ -24,7 +19,7 @@ * @constructor * @param {Object} conn * An {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}. - *

Note that if this HttpProxy is being used by a (@link Ext.data.Store Store}, then the + *

Note that if this HttpProxy is being used by a {@link Ext.data.Store Store}, then the * Store's call to {@link #load} will override any specified callback and params * options. In this case, use the Store's {@link Ext.data.Store#events events} to modify parameters, * or react to loading events. The Store's {@link Ext.data.Store#baseParams baseParams} may also be @@ -102,8 +97,9 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { *

  • r : Ext.data.Record[] The block of Ext.data.Records.
  • *
  • options: Options object from the action request
  • *
  • success: Boolean success indicator
  • - * @param {Object} scope The scope in which to call the callback + * @param {Object} scope The scope (this reference) in which the callback function is executed. Defaults to the browser window. * @param {Object} arg An optional argument which is passed to the callback as its second parameter. + * @protected */ doRequest : function(action, rs, params, reader, cb, scope, arg) { var o = { @@ -120,7 +116,6 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { // If possible, transmit data using jsonData || xmlData on Ext.Ajax.request (An installed DataWriter would have written it there.). // Use std HTTP params otherwise. - // TODO wrap into 1 Ext.apply now? if (params.jsonData) { o.jsonData = params.jsonData; } else if (params.xmlData) { @@ -129,14 +124,10 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { o.params = params || {}; } // Set the connection url. If this.conn.url is not null here, - // the user may have overridden the url during a beforeaction event-handler. + // the user must have overridden the url during a beforewrite/beforeload event-handler. // this.conn.url is nullified after each request. - if (this.conn.url === null) { - this.conn.url = this.buildUrl(action, rs); - } - else if (this.restful === true && rs instanceof Ext.data.Record && !rs.phantom) { // <-- user must have intervened with #setApi or #setUrl - this.conn.url += '/' + rs.id; - } + this.conn.url = this.buildUrl(action, rs); + if(this.useAjax){ Ext.applyIf(o, this.conn); @@ -185,7 +176,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { } }, - /** +
    /** * Callback for read action * @param {String} action Action name as per {@link Ext.data.Api.actions#read}. * @param {Object} o The request transaction object @@ -193,7 +184,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { * @fires loadexception (deprecated) * @fires exception * @fires load - * @private + * @protected */ onRead : function(action, o, response) { var result; @@ -225,14 +216,14 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { // NOTE reader.readResponse does not currently return Ext.data.Response o.request.callback.call(o.request.scope, result, o.request.arg, result.success); }, - /** +
    /** * Callback for write actions * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] * @param {Object} trans The request transaction object * @param {Object} res The server response * @fires exception * @fires write - * @private + * @protected */ onWrite : function(action, o, response, rs) { var reader = o.reader; @@ -269,6 +260,6 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { } Ext.data.HttpProxy.superclass.destroy.call(this); } -});
    - +});
    + \ No newline at end of file