diff --git a/webapp/controller/Home.controller.js b/webapp/controller/Home.controller.js index d15277b..21d0b90 100644 --- a/webapp/controller/Home.controller.js +++ b/webapp/controller/Home.controller.js @@ -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", { @@ -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") }, }); } diff --git a/webapp/i18n/i18n_example.properties b/webapp/i18n/i18n_example.properties deleted file mode 100644 index 85f4194..0000000 --- a/webapp/i18n/i18n_example.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Field labels -firstName=First Name -lastName=Last Name -enabled=Enabled - -# Screen titles -panelHeaderText=Data Binding Basics \ No newline at end of file diff --git a/webapp/i18n/i18n_example_de.properties b/webapp/i18n/i18n_example_de.properties deleted file mode 100644 index 8a4ba0c..0000000 --- a/webapp/i18n/i18n_example_de.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Field labels -firstName=Vorname -lastName=Nachname -enabled=Aktiviert - -# Screen titles -panelHeaderText=Data Binding Grundlagen \ No newline at end of file