Skip to content

Commit

Permalink
Reverted Step 6 & 7 as the resource bundle is handled within the mani…
Browse files Browse the repository at this point in the history
…fest.json nowadays;
  • Loading branch information
wridgeu committed May 20, 2020
1 parent 121a5b4 commit e4e3f1e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
12 changes: 2 additions & 10 deletions webapp/controller/Home.controller.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sap.ui.define(
[
"com/mrb/UI5-Data-Binding/controller/BaseController",
"sap/ui/model/json/JSONModel",
"sap/ui/model/resource/ResourceModel"
"sap/ui/model/json/JSONModel"
],
function (BaseController, JSONModel, ResourceModel) {
function (BaseController, JSONModel) {
"use strict";

return BaseController.extend("com.mrb.UI5-Data-Binding.controller.Home", {
Expand All @@ -17,17 +16,10 @@ sap.ui.define(
panelHeaderText: "Data Binding Basics",
});

// Create a resource bundle for language specific texts
// nowadays those are being declared via manifest.json
var oResourceModel = new ResourceModel({
bundleName: "com.mrb.UI5-Data-Binding.i18n.i18n_example",
});

//Set model globally for all views/controls (dirty) "sap.ui.getCore().setModel(oModel);""
//the go-to way for global definition would be to define the model within the manifest.json-file
//and retrieve it via "this.getOwnerComponent().getModel();"
this.getView().setModel(oModel);
this.getView().setModel(oResourceModel, "i18n_example")
},
});
}
Expand Down
7 changes: 0 additions & 7 deletions webapp/i18n/i18n_example.properties

This file was deleted.

7 changes: 0 additions & 7 deletions webapp/i18n/i18n_example_de.properties

This file was deleted.

0 comments on commit e4e3f1e

Please sign in to comment.