1 dump('entering main/network.js\n');
3 if (typeof main == 'undefined') main = {};
4 main.network = function (mw,G) {
6 this.mw = mw; this.G = G;
8 // Place a test here for network connectivity
9 // this.offline = true;
14 main.network.prototype = {
16 // Flag for whether the staff client should act as if it were offline or not
19 'request' : function (app,name,params,f) {
23 this.G.error.sdump('D_SES','=-=-=-=-= user_request("'+app+'","'+name+'",'+js2JSON(params)+')\n');
24 var request = new RemoteRequest( app, name );
25 for(var index in params) {
26 request.addParam(params[index]);
30 request.setCompleteCallback(f);
32 this.G.error.sdump('D_SES_RESULT','=-=-= result asynced\n');
36 var result = request.getResultObject();
37 this.G.error.sdump('D_SES_RESULT','=-=-= result = ' + js2JSON(result) + '\n');
42 if (instanceOf(E,perm_ex)) {
43 alert('permission exception: ' + js2JSON(E));
51 function sample_callback(request) {
52 var result = request.getResultObject();
56 dump('exiting main/network.js\n');