@@ -35,7 +35,7 @@ define([
3535 contextObj : null ,
3636
3737 postCreate : function ( ) {
38- logger . debug ( this . id + ".postCreate" ) ;
38+ mx . logger . debug ( this . id + ".postCreate" ) ;
3939 this . _setupEvents ( ) ;
4040
4141 if ( ! this . refreshOnContextChange ) {
@@ -44,7 +44,7 @@ define([
4444 } ,
4545
4646 executeCode : function ( ) {
47- logger . debug ( this . id + ".executeCode" ) ;
47+ mx . logger . debug ( this . id + ".executeCode" ) ;
4848 var external = this . contentsPath !== "" ? true : false ;
4949 switch ( this . contenttype ) {
5050 case "html" :
@@ -99,7 +99,7 @@ define([
9999 } ,
100100
101101 update : function ( obj , callback ) {
102- logger . debug ( this . id + ".update" ) ;
102+ mx . logger . debug ( this . id + ".update" ) ;
103103 this . contextObj = obj ;
104104 if ( this . refreshOnContextChange ) {
105105 this . executeCode ( ) ;
@@ -123,7 +123,7 @@ define([
123123 } ,
124124
125125 _setupEvents : function ( ) {
126- logger . debug ( this . id + "._setupEvents" ) ;
126+ mx . logger . debug ( this . id + "._setupEvents" ) ;
127127 if ( this . onclickmf ) {
128128 this . connect (
129129 this . domNode ,
@@ -134,32 +134,31 @@ define([
134134 } ,
135135
136136 _executeMicroflow : function ( ) {
137- logger . debug ( this . id + "._executeMicroflow" ) ;
137+ mx . logger . debug ( this . id + "._executeMicroflow" ) ;
138138 if ( this . onclickmf ) {
139- var params = { } ;
139+ var params = {
140+ actionname : this . onclickmf
141+ } ;
140142 if ( this . contextObj !== null ) {
141143 params . applyto = "selection" ;
142144 params . guids = [ this . contextObj . getGuid ( ) ] ;
143145 }
144- mx . ui . action (
145- this . onclickmf , {
146- params : params ,
147- callback : function ( obj ) {
148- logger . debug (
149- this . id + " (executed microflow successfully)."
150- ) ;
151- } ,
152- error : function ( error ) {
153- logger . error ( this . id + error ) ;
154- }
146+ mx . data . action ( {
147+ params : params ,
148+ callback : function ( obj ) {
149+ mx . logger . debug (
150+ this . id + " (executed microflow successfully)."
151+ ) ;
155152 } ,
156- this
157- ) ;
153+ error : function ( error ) {
154+ mx . logger . error ( this . id + error ) ;
155+ }
156+ } ) ;
158157 }
159158 } ,
160159
161160 evalJs : function ( ) {
162- logger . debug ( this . id + ".evalJS" ) ;
161+ mx . logger . debug ( this . id + ".evalJS" ) ;
163162 try {
164163 eval ( this . contents + "\r\n//# sourceURL=" + this . id + ".js" ) ;
165164 } catch ( error ) {
@@ -168,7 +167,7 @@ define([
168167 } ,
169168
170169 _evalJQueryCode : function ( ) {
171- logger . debug ( this . id + "._evalJQueryCode" ) ;
170+ mx . logger . debug ( this . id + "._evalJQueryCode" ) ;
172171 require ( [ "jquery" ] , lang . hitch ( this , function ( jQuery ) {
173172 try {
174173 ( function ( snippetCode ) {
@@ -198,7 +197,7 @@ define([
198197 } ,
199198
200199 _handleError : function ( error ) {
201- logger . debug ( this . id + "._handleError" ) ;
200+ mx . logger . debug ( this . id + "._handleError" ) ;
202201 domConstruct . place (
203202 '<div class="alert alert-danger">Error while evaluating javascript input: ' +
204203 error +
@@ -209,7 +208,7 @@ define([
209208 } ,
210209
211210 _executeCallback : function ( cb , from ) {
212- logger . debug ( this . id + "._executeCallback" + ( from ? " from " + from : "" ) ) ;
211+ mx . logger . debug ( this . id + "._executeCallback" + ( from ? " from " + from : "" ) ) ;
213212 if ( cb && typeof cb === "function" ) {
214213 cb ( ) ;
215214 }
0 commit comments