X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/source/RemotingProvider.html?ds=inline
diff --git a/docs/source/RemotingProvider.html b/docs/source/RemotingProvider.html
index 1bed9bd3..3b8fd700 100644
--- a/docs/source/RemotingProvider.html
+++ b/docs/source/RemotingProvider.html
@@ -1,5 +1,6 @@
+
The source code
@@ -103,9 +104,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 +125,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 +135,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 +144,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 +179,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 +226,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 +241,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 +267,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 +366,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{