File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ sap.ui.define(
9
9
return BaseController . extend ( "com.mrb.UI5-Data-Binding.controller.Home" , {
10
10
onInit : function ( ) {
11
11
// Create a JSON model from an object literal
12
- var oModel = new JSONModel ( {
12
+ var oModel , oMessageManager ;
13
+
14
+ oModel = new JSONModel ( {
13
15
firstName : "Harry" ,
14
16
lastName : "Hawk" ,
15
17
enabled : true ,
@@ -27,6 +29,10 @@ sap.ui.define(
27
29
//the go-to way for global definition would be to define the model within the manifest.json-file
28
30
//and retrieve it via "this.getOwnerComponent().getModel();"
29
31
this . getView ( ) . setModel ( oModel ) ;
32
+
33
+ //MessageManager is a singleton
34
+ oMessageManager = sap . ui . getCore ( ) . getMessageManager ( ) ;
35
+ oMessageManager . registerObject ( this . getView ( ) , true ) ;
30
36
} ,
31
37
} ) ;
32
38
}
You can’t perform that action at this time.
0 commit comments