1-
2- // Required module list. Remove unnecessary modules, you can always get them back from the boilerplate.
31require ( [
42 "dojo/_base/declare" ,
53 "dojo/_base/lang" ,
64 "CustomString/widget/CustomString"
7- ] , function ( declare , dojoLang , _customStringNoContextWidget ) {
5+ ] , function ( declare , lang , _customStringNoContextWidget ) {
86
9- // Declare widget's prototype.
107 return declare ( "CustomString.widget.CustomStringNoContext" , [ _customStringNoContextWidget ] , {
118
12- // dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
139 postCreate : function ( ) {
1410 logger . debug ( this . id + ".postCreate" ) ;
1511 this . _setupEvents ( ) ;
1612 } ,
1713
18- // Attach events to HTML dom elements
1914 _setupEvents : function ( ) {
2015 logger . debug ( this . id + "._setupEvents" ) ;
2116 if ( this . mfToExecute ) {
@@ -26,14 +21,14 @@ require([
2621 _render : function ( callback ) {
2722 logger . debug ( this . id + "._render" ) ;
2823 mx . ui . action ( this . sourceMF , {
29- callback : dojoLang . hitch ( this , this . _processSourceMFCallback , callback ) ,
30- error : dojoLang . hitch ( this , function ( error ) {
24+ callback : lang . hitch ( this , this . _processSourceMFCallback , callback ) ,
25+ error : lang . hitch ( this , function ( error ) {
3126 alert ( error . description ) ;
32- mendix . lang . nullExec ( callback ) ;
27+ this . _executeCallback ( callback , "_render error cb" ) ;
3328 } ) ,
34- onValidation : dojoLang . hitch ( this , function ( validations ) {
29+ onValidation : lang . hitch ( this , function ( validations ) {
3530 alert ( "There were " + validations . length + " validation errors" ) ;
36- mendix . lang . nullExec ( callback ) ;
31+ this . _executeCallback ( callback , "_render onvalidation cb" ) ;
3732 } )
3833 } , this ) ;
3934 } ,
@@ -44,10 +39,7 @@ require([
4439 mx . ui . action ( this . mfToExecute , { } , this ) ;
4540 }
4641 }
47-
4842 } ) ;
4943} ) ;
5044
51- require ( [ "CustomString/widget/CustomStringNoContext" ] , function ( ) {
52- "use strict" ;
53- } ) ;
45+ require ( [ "CustomString/widget/CustomStringNoContext" ] ) ;
0 commit comments