X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/RemotingProvider.html diff --git a/docs/source/RemotingProvider.html b/docs/source/RemotingProvider.html index 1bed9bd3..5249ee4e 100644 --- a/docs/source/RemotingProvider.html +++ b/docs/source/RemotingProvider.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.direct.RemotingProvider * @extends Ext.direct.JsonProvider * @@ -103,9 +109,15 @@ TestAction.multiply(
/** * @cfg {Number} maxRetries - * Number of times to re-attempt delivery on failure of a call. + * Number of times to re-attempt delivery on failure of a call. Defaults to 1. */ maxRetries: 1, + +
/** + * @cfg {Number} timeout + * The timeout to use for each request. Defaults to undefined. + */ + timeout: undefined, constructor : function(config){ Ext.direct.RemotingProvider.superclass.constructor.call(this, config); @@ -118,7 +130,7 @@ TestAction.multiply( * @param {Ext.direct.RemotingProvider} provider * @param {Ext.Direct.Transaction} transaction */ - 'beforecall', + 'beforecall',
/** * @event call * Fires immediately after the request to the server-side is sent. This does @@ -128,7 +140,7 @@ TestAction.multiply( */ 'call' ); - this.namespace = (typeof this.namespace === 'string') ? Ext.ns(this.namespace) : this.namespace || window; + this.namespace = (Ext.isString(this.namespace)) ? Ext.ns(this.namespace) : this.namespace || window; this.transactions = {}; this.callBuffer = []; }, @@ -137,8 +149,8 @@ TestAction.multiply( initAPI : function(){ var o = this.actions; for(var c in o){ - var cls = this.namespace[c] || (this.namespace[c] = {}); - var ms = o[c]; + var cls = this.namespace[c] || (this.namespace[c] = {}), + ms = o[c]; for(var i = 0, len = ms.length; i < len; i++){ var m = ms[i]; cls[m.name] = this.createMethod(c, m); @@ -172,8 +184,8 @@ TestAction.multiply( if(success){ var events = this.getEvents(xhr); for(var i = 0, len = events.length; i < len; i++){ - var e = events[i]; - var t = this.getTransaction(e); + var e = events[i], + t = this.getTransaction(e); this.fireEvent('data', this, e); if(t){ this.doCallback(t, e, true); @@ -219,11 +231,10 @@ TestAction.multiply( url: this.url, callback: this.onData, scope: this, - ts: data - }; + ts: data, + timeout: this.timeout + }, callData; - // send only needed data - var callData; if(Ext.isArray(data)){ callData = []; for(var i = 0, len = data.length; i < len; i++){ @@ -235,7 +246,7 @@ TestAction.multiply( if(this.enableUrlEncode){ var params = {}; - params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData); + params[Ext.isString(this.enableUrlEncode) ? this.enableUrlEncode : 'data'] = Ext.encode(callData); o.params = params; }else{ o.jsonData = callData; @@ -261,7 +272,7 @@ TestAction.multiply( if(!this.callTask){ this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); } - this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10); + this.callTask.delay(Ext.isNumber(this.enableBuffer) ? this.enableBuffer : 10); }else{ this.combineAndSend(); } @@ -360,8 +371,8 @@ TestAction.multiply( doCallback: function(t, e){ var fn = e.status ? 'success' : 'failure'; if(t && t.cb){ - var hs = t.cb; - var result = e.result || e.data; + var hs = t.cb, + result = Ext.isDefined(e.result) ? e.result : e.data; if(Ext.isFunction(hs)){ hs(result, e); } else{ @@ -371,6 +382,6 @@ TestAction.multiply( } } }); -Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;
- +Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;
+ \ No newline at end of file