a:24:{s:9:"#provides";s:20:"dojox.wire.ml.Action";s:9:"#resource";s:17:"wire/ml/Action.js";s:9:"#requires";a:4:{i:0;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}i:1;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Container";i:2;s:5:"dijit";}i:2;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.wire.Wire";}i:3;a:2:{i:0;s:6:"common";i:1;s:18:"dojox.wire.ml.util";}}s:20:"dojox.wire.ml.Action";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:2:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Container";}}s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dijit._Container.prototype";}}s:7:"summary";s:62:"A base widget to "run" a task on an event or a topic";s:11:"description";s:600:"This widget represents a controller task to be run when an event (a function) or a topic is issued. Sub-classes must implement _run() method to implement their tasks. 'trigger' specifies an event scope, an ID of a widget or an DOM element, or its property with the optional dotted notation. If this widget has child ActionFilter widgets, their filter() methods are called with the arguments to the event or the topic. If one of filter() methods returns false, run() won't be invoked. This widget also can serve as a composite task to run child Actions on an event or a topic specified to this widget.";s:9:"classlike";b:1;}s:28:"dojox.wire.ml.Action.trigger";a:3:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:2:"An";s:7:"summary";s:11:"event scope";}s:33:"dojox.wire.ml.Action.triggerEvent";a:3:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:2:"An";s:7:"summary";s:21:"event (function) name";}s:33:"dojox.wire.ml.Action.triggerTopic";a:3:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:1:"A";s:7:"summary";s:10:"topic name";}s:31:"dojox.wire.ml.Action.postCreate";a:5:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:18:" this._connect();";s:7:"summary";s:15:"Call _connect()";s:11:"description";s:15:"See _connect().";}s:29:"dojox.wire.ml.Action._connect";a:7:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:653:" if(this.triggerEvent){ if(this.trigger){ var scope = dojox.wire.ml._getValue(this.trigger); if(scope){ if(!scope[this.triggerEvent]){ // set a dummy function for an anonymous object scope[this.triggerEvent] = function(){}; } this._triggerHandle = dojo.connect(scope, this.triggerEvent, this, "run"); } }else{ var event = this.triggerEvent.toLowerCase(); if(event == "onload"){ var self = this; dojo.addOnLoad(function(){ self._run.apply(self, arguments); }); } } }else if(this.triggerTopic){ this._triggerHandle = dojo.subscribe(this.triggerTopic, this, "run"); }";s:7:"summary";s:43:"Connect run() method to an event or a topic";s:11:"description";s:202:"If 'triggerEvent' and 'trigger' are specified, connect() is used to set up run() to be called on the event. If 'triggerTopic' is specified, subscribe() is used to set up run() to be called on the topic.";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:9:"self._run";}}s:7:"private";b:1;}s:32:"dojox.wire.ml.Action._disconnect";a:6:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:175:" if(this._triggerHandle){ if(this.triggerTopic){ dojo.unsubscribe(this.triggerTopic, this._triggerHandle); }else{ dojo.disconnect(this._triggerHandle); } }";s:7:"summary";s:48:"Disconnect run() method from an event or a topic";s:11:"description";s:215:"If 'triggerEvent' and 'trigger' are specified, disconnect() is used to set up run() not to be called on the event. If 'triggerTopic' is specified, unsubscribe() is used to set up run() not to be called on the topic.";s:7:"private";b:1;}s:24:"dojox.wire.ml.Action.run";a:6:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:253:" var children = this.getChildren(); for(var i in children){ var child = children[i]; if(child instanceof dojox.wire.ml.ActionFilter){ if(!child.filter.apply(child, arguments)){ return; } } } this._run.apply(this, arguments);";s:7:"summary";s:10:"Run a task";s:11:"description";s:151:"This method calls filter() method of child ActionFilter widgets. If one of them returns false, this method returns. Otherwise, _run() method is called.";s:6:"chains";a:1:{s:4:"call";a:2:{i:0;s:12:"child.filter";i:1;s:9:"this._run";}}}s:25:"dojox.wire.ml.Action._run";a:7:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:184:" var children = this.getChildren(); for(var i in children){ var child = children[i]; if(child instanceof dojox.wire.ml.Action){ child.run.apply(child, arguments); } }";s:7:"summary";s:42:"Call run() methods of child Action widgets";s:11:"description";s:72:"If this widget has child Action widgets, their run() methods are called.";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:9:"child.run";}}s:7:"private";b:1;}s:33:"dojox.wire.ml.Action.uninitialize";a:4:{s:9:"prototype";s:20:"dojox.wire.ml.Action";s:4:"type";s:8:"Function";s:6:"source";s:36:" this._disconnect(); return true;";s:7:"summary";s:75:"Over-ride of base widget unitialize function to do some connection cleanup.";}s:35:"dojox.wire.ml.Action._triggerHandle";a:3:{s:8:"instance";s:20:"dojox.wire.ml.Action";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.wire.ml.ActionFilter";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:1:{i:0;s:13:"dijit._Widget";}}s:7:"summary";s:56:"A widget to define a filter for the parent Action to run";s:11:"description";s:215:"This base class checks a required property specified with 'required' attribute. If 'message' is specified, the message is set to a property specified with 'error'. Subclasses may implement their own filter() method.";s:9:"classlike";b:1;}s:35:"dojox.wire.ml.ActionFilter.required";a:4:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:8:"instance";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:1:"A";s:7:"summary";s:17:"property required";}s:40:"dojox.wire.ml.ActionFilter.requiredValue";a:4:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:8:"instance";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:9:"Optional.";s:7:"summary";s:165:" A specific value the property is required to have. If this isn't provided than any non-false/non-null value of the required propery will cause this filter to pass.";}s:31:"dojox.wire.ml.ActionFilter.type";a:3:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:9:"Optional.";s:7:"summary";s:135:" A specific type to compare the values as (if requiredValue is set) Valid values for type are boolean, int, string. Default is string.";}s:34:"dojox.wire.ml.ActionFilter.message";a:3:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:2:"An";s:7:"summary";s:77:"error message to emit if the filter doesn't execute due to property mismatch.";}s:32:"dojox.wire.ml.ActionFilter.error";a:3:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:1:"A";s:7:"summary";s:52:"property to store an error due to property mismatch.";}s:33:"dojox.wire.ml.ActionFilter.filter";a:7:{s:9:"prototype";s:26:"dojox.wire.ml.ActionFilter";s:4:"type";s:8:"Function";s:6:"source";s:901:" if(this.required === ""){ return true; //Boolean }else{ var value = dojox.wire.ml._getValue(this.required, arguments); if(this.requiredValue === ""){ //Just see if there's a value, nothing to compare it to. if(value){ return true; //Boolean } }else{ //See if we need to type convert. var reqValue = this.requiredValue; if(this.type !== ""){ var lType = this.type.toLowerCase(); if(lType === "boolean"){ if(reqValue.toLowerCase() === "false"){ reqValue = false; }else{ reqValue = true; } }else if(lType === "number"){ reqValue = parseInt(reqValue, 10); } } if(value === reqValue){ return true; //boolean } } } if(this.message){ if(this.error){ dojox.wire.ml._setValue(this.error, this.message); }else{ alert(this.message); } } return false; //Boolean";s:7:"summary";s:127:"Check if a required property is specified. Also, if provided, check to see if the required property contains a specific value.";s:11:"description";s:698:"If a value is undefined for a property, specified with 'required', this method returns false. If the value for a property is defined, but there isn't a requiredValue for it then any non-false value will cause the method to return true. if requiredValue is set, then filter compares that value with the value from the required property and returns true if and only if they match. The type option just allows for a way to convert the required property values into a proper form for comparison (boolean, number, etc). If 'message' is specified, it is set to a proeprty specified with 'error' or shown with alert(). If 'required' starts with "arguments", a property of the method arguments are checked.";s:14:"return_summary";s:110:"True if a required property is specified (and if requiredValue is specified, that they match), otherwise false";s:7:"returns";s:15:"Boolean|boolean";}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:"";}}