1
-
2
- // Required module list. Remove unnecessary modules, you can always get them back from the boilerplate.
3
1
require ( [
4
2
"dojo/_base/declare" ,
5
3
"dojo/_base/lang" ,
6
4
"CustomString/widget/CustomString"
7
- ] , function ( declare , dojoLang , _customStringNoContextWidget ) {
5
+ ] , function ( declare , lang , _customStringNoContextWidget ) {
8
6
9
- // Declare widget's prototype.
10
7
return declare ( "CustomString.widget.CustomStringNoContext" , [ _customStringNoContextWidget ] , {
11
8
12
- // dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
13
9
postCreate : function ( ) {
14
10
logger . debug ( this . id + ".postCreate" ) ;
15
11
this . _setupEvents ( ) ;
16
12
} ,
17
13
18
- // Attach events to HTML dom elements
19
14
_setupEvents : function ( ) {
20
15
logger . debug ( this . id + "._setupEvents" ) ;
21
16
if ( this . mfToExecute ) {
@@ -26,14 +21,14 @@ require([
26
21
_render : function ( callback ) {
27
22
logger . debug ( this . id + "._render" ) ;
28
23
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 ) {
31
26
alert ( error . description ) ;
32
- mendix . lang . nullExec ( callback ) ;
27
+ this . _executeCallback ( callback , "_render error cb" ) ;
33
28
} ) ,
34
- onValidation : dojoLang . hitch ( this , function ( validations ) {
29
+ onValidation : lang . hitch ( this , function ( validations ) {
35
30
alert ( "There were " + validations . length + " validation errors" ) ;
36
- mendix . lang . nullExec ( callback ) ;
31
+ this . _executeCallback ( callback , "_render onvalidation cb" ) ;
37
32
} )
38
33
} , this ) ;
39
34
} ,
@@ -44,10 +39,7 @@ require([
44
39
mx . ui . action ( this . mfToExecute , { } , this ) ;
45
40
}
46
41
}
47
-
48
42
} ) ;
49
43
} ) ;
50
44
51
- require ( [ "CustomString/widget/CustomStringNoContext" ] , function ( ) {
52
- "use strict" ;
53
- } ) ;
45
+ require ( [ "CustomString/widget/CustomStringNoContext" ] ) ;
0 commit comments