a:17:{s:9:"#provides";s:24:"dojox.wire.ml.Invocation";s:9:"#resource";s:21:"wire/ml/Invocation.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:20:"dojox.wire.ml.Action";}}s:24:"dojox.wire.ml.Invocation";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:20:"dojox.wire.ml.Action";}s:4:"call";a:1:{i:0;s:20:"dojox.wire.ml.Action";}}s:7:"summary";s:46:"A widget to invoke a method or publish a topic";s:11:"description";s:127:"This widget represents a controller task to invoke a method or publish a topic when an event (a function) or a topic is issued.";s:9:"classlike";b:1;}s:31:"dojox.wire.ml.Invocation.object";a:3:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:1:"A";s:7:"summary";s:27:"scope of a method to invoke";}s:31:"dojox.wire.ml.Invocation.method";a:4:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:8:"instance";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:1:"A";s:7:"summary";s:26:"name of a method to invoke";}s:30:"dojox.wire.ml.Invocation.topic";a:3:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:1:"A";s:7:"summary";s:26:"name of a topic to publish";}s:35:"dojox.wire.ml.Invocation.parameters";a:3:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:9:"Arguments";s:7:"summary";s:27:"for the method or the topic";}s:31:"dojox.wire.ml.Invocation.result";a:3:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:1:"A";s:7:"summary";s:51:"property to store a return value of the method call";}s:30:"dojox.wire.ml.Invocation.error";a:3:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:1:"A";s:7:"summary";s:45:"property to store an error on the method call";}s:29:"dojox.wire.ml.Invocation._run";a:7:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:8:"Function";s:6:"source";s:1568:" if(this.topic){ var args = this._getParameters(arguments); try{ dojo.publish(this.topic, args); this.onComplete(); }catch(e){ this.onError(e); } }else if(this.method){ var scope = (this.object ? dojox.wire.ml._getValue(this.object) : dojo.global); if(!scope){ return; //undefined } var args = this._getParameters(arguments); var func = scope[this.method]; if(!func){ func = scope.callMethod; if(!func){ return; //undefined } args = [this.method, args]; } try{ var connected = false; if(scope.getFeatures){ var features = scope.getFeatures(); if((this.method == "fetch" && features["dojo.data.api.Read"]) || (this.method == "save" && features["dojo.data.api.Write"])){ var arg = args[0]; if(!arg.onComplete){ arg.onComplete = function(){}; } //dojo.connect(arg, "onComplete", this, "onComplete"); this.connect(arg, "onComplete", "onComplete"); if(!arg.onError){ arg.onError = function(){}; } //dojo.connect(arg, "onError", this, "onError"); this.connect(arg, "onError", "onError"); connected = true; } } var r = func.apply(scope, args); if(!connected){ if(r && (r instanceof dojo.Deferred)){ var self = this; r.addCallbacks( function(result){self.onComplete(result);}, function(error){self.onError(error);} ); }else{ this.onComplete(r); } } }catch(e){ this.onError(e); } }";s:7:"summary";s:34:"Invoke a method or publish a topic";s:11:"description";s:445:"If 'topic' is specified, the topic is published with arguments specified to 'parameters'. If 'method' and 'object' are specified, the method is invoked with arguments specified to 'parameters' and set the return value to a property specified to 'result'. 'object', 'parameters' and 'result' can specify properties of a widget or an DOM element with the dotted notation. If 'parameters' are omitted, the arguments to this method are passed as is.";s:7:"returns";s:9:"undefined";s:7:"private";b:1;}s:35:"dojox.wire.ml.Invocation.onComplete";a:6:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"result";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:53:"The return value of a method or undefined for a topic";}}s:6:"source";s:152:" if(this.result){ dojox.wire.ml._setValue(this.result, result); } if(this.error){ // clear error dojox.wire.ml._setValue(this.error, ""); }";s:7:"summary";s:64:"A function called when the method or the topic publish completed";s:11:"description";s:89:"If 'result' attribute is specified, the result object also set to the specified property.";}s:32:"dojox.wire.ml.Invocation.onError";a:6:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"error";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:31:"The exception or error occurred";}}s:6:"source";s:131:" if(this.error){ if(error && error.message){ error = error.message; } dojox.wire.ml._setValue(this.error, error); }";s:7:"summary";s:36:"A function called on an error occurs";s:11:"description";s:87:"If 'error' attribute is specified, the error object also set to the specified property.";}s:39:"dojox.wire.ml.Invocation._getParameters";a:8:{s:9:"prototype";s:24:"dojox.wire.ml.Invocation";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:37:"Arguments to a trigger event or topic";}}s:6:"source";s:485:" if(!this.parameters){ // use arguments as is return args; //Array } var parameters = []; var list = this.parameters.split(","); if(list.length == 1){ var parameter = dojox.wire.ml._getValue(dojo.trim(list[0]), args); if(dojo.isArray(parameter)){ parameters = parameter; }else{ parameters.push(parameter); } }else{ for(var i in list){ parameters.push(dojox.wire.ml._getValue(dojo.trim(list[i]), args)); } } return parameters; //Array";s:7:"summary";s:48:"Returns arguments to a method or topic to invoke";s:11:"description";s:213:"This method retunrs an array of arguments specified by 'parameters' attribute, a comma-separated list of IDs and their properties in a dotted notation. If 'parameters' are omitted, the original arguments are used.";s:7:"returns";s:5:"Array";s:7:"private";b:1;}s:13:"dojox.wire.ml";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.wire";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}