File tree Expand file tree Collapse file tree
generators/app/templates/WidgetBoilerplate/src/WidgetName/widget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,13 +66,36 @@ define([
6666 dojoStyle.set(this.domNode, "display", "none");
6767 }
6868
69- this._executeCallback(callback);
69+ this._executeCallback(callback, "_updateRendering" );
7070 },
7171
72- _executeCallback: function (cb) {
73- if (cb && typeof cb === "function") {
74- cb();
75- }
72+ // Shorthand for running a microflow
73+ _execMf: function (mf, guid, cb) {
74+ logger.debug(this.id + "._execMf");
75+ if (mf && guid) {
76+ mx.ui.action(mf, {
77+ params: {
78+ applyto: "selection",
79+ guids: [guid]
80+ },
81+ callback: lang.hitch(this, function (objs) {
82+ if (cb && typeof cb === "function") {
83+ cb(objs);
84+ }
85+ }),
86+ error: function (error) {
87+ console.debug(error.description);
88+ }
89+ }, this);
90+ }
91+ },
92+
93+ // Shorthand for executing a callback, adds logging to your inspector
94+ _executeCallback: function (cb, from) {
95+ logger.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
96+ if (cb && typeof cb === "function") {
97+ cb();
98+ }
7699 }
77100 });
78101});
You can’t perform that action at this time.
0 commit comments