root / trunk / web / dojo / dojox / rpc / ProxiedPath.js @ 12
History | View | Annotate | Download (793 Bytes)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.rpc.ProxiedPath"]){ |
9 |
dojo._hasResource["dojox.rpc.ProxiedPath"]=true; |
10 |
dojo.provide("dojox.rpc.ProxiedPath");
|
11 |
dojo.require("dojox.rpc.Service");
|
12 |
dojox.rpc.envelopeRegistry.register("PROXIED-PATH",function(_1){ |
13 |
return _1=="PROXIED-PATH"; |
14 |
},{serialize:function(_2,_3,_4){ |
15 |
var i;
|
16 |
var _5=dojox.rpc.getTarget(_2,_3);
|
17 |
if(dojo.isArray(_4)){
|
18 |
for(i=0;i<_4.length;i++){ |
19 |
_5+="/"+(_4[i]==null?"":_4[i]); |
20 |
} |
21 |
}else{
|
22 |
for(i in _4){ |
23 |
_5+="/"+i+"/"+_4[i]; |
24 |
} |
25 |
} |
26 |
return {data:"",target:(_3.proxyUrl||_2.proxyUrl)+"?url="+encodeURIComponent(_5)}; |
27 |
},deserialize:function(_6){ |
28 |
return _6;
|
29 |
}}); |
30 |
} |