From 81bea17aefb26859f825b9293c7c99192874806e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 8 Nov 2011 20:40:44 +0400 Subject: upgrade Dojo to 1.6.1 --- lib/dojo/rpc/RpcService.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/dojo/rpc/RpcService.js') diff --git a/lib/dojo/rpc/RpcService.js b/lib/dojo/rpc/RpcService.js index 7ff71415e..5ef5dae7f 100644 --- a/lib/dojo/rpc/RpcService.js +++ b/lib/dojo/rpc/RpcService.js @@ -1,5 +1,5 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ @@ -9,6 +9,7 @@ if(!dojo._hasResource["dojo.rpc.RpcService"]){ //_hasResource checks added by bu dojo._hasResource["dojo.rpc.RpcService"] = true; dojo.provide("dojo.rpc.RpcService"); + dojo.declare("dojo.rpc.RpcService", null, { constructor: function(args){ //summary: @@ -25,7 +26,7 @@ dojo.declare("dojo.rpc.RpcService", null, { // matches those defined in the smd. smdString allows a developer to pass // a jsonString directly, which will be converted into an object or alternatively // smdObject is accepts an smdObject directly. - // + // if(args){ //if the arg is a string, we assume it is a url to retrieve an smd definition from if( (dojo.isString(args)) || (args instanceof dojo._Url)){ @@ -99,7 +100,7 @@ dojo.declare("dojo.rpc.RpcService", null, { // deferredRequestHandler: Deferred // The deferred object handling a request. - var tf = dojo.hitch(this, + var tf = dojo.hitch(this, function(obj){ if(obj.error!=null){ var err; @@ -114,7 +115,7 @@ dojo.declare("dojo.rpc.RpcService", null, { err.errorObject = obj; deferredRequestHandler.errback(err); }else{ - deferredRequestHandler.callback(this.parseResults(obj)); + deferredRequestHandler.callback(this.parseResults(obj)); } } ); @@ -160,7 +161,7 @@ dojo.declare("dojo.rpc.RpcService", null, { dojo.forEach(object.methods, function(m){ if(m && m.name){ this[m.name] = this.generateMethod( m.name, - m.parameters, + m.parameters, m.url||m.serviceUrl||m.serviceURL); if(!dojo.isFunction(this[m.name])){ throw new Error("RpcService: Failed to create" + m.name + "()"); -- cgit v1.2.3