diff --git a/app/webapp/Component.js b/app/webapp/Component.js index 46a8e363..1722a297 100644 --- a/app/webapp/Component.js +++ b/app/webapp/Component.js @@ -8,6 +8,9 @@ sap.ui.define(["sap/ui/core/UIComponent", "z2ui5/model/models","z2ui5/cc/Server" UIComponent.prototype.init.apply(this, arguments); + if (typeof z2ui5 == 'undefined'){ + z2ui5 = {}; + } this.getRouter().initialize(); z2ui5.oRouter = this.getRouter(); this.setModel(Models.createDeviceModel(), "device"); diff --git a/src/01/03/z2ui5_cl_app_component_js.clas.abap b/src/01/03/z2ui5_cl_app_component_js.clas.abap index 389431d7..9edc637c 100644 --- a/src/01/03/z2ui5_cl_app_component_js.clas.abap +++ b/src/01/03/z2ui5_cl_app_component_js.clas.abap @@ -28,6 +28,9 @@ CLASS z2ui5_cl_app_component_js IMPLEMENTATION. `` && |\n| && ` UIComponent.prototype.init.apply(this, arguments);` && |\n| && `` && |\n| && + ` if (typeof z2ui5 == 'undefined'){` && |\n| && + ` z2ui5 = {};` && |\n| && + ` }` && |\n| && ` this.getRouter().initialize();` && |\n| && ` z2ui5.oRouter = this.getRouter();` && |\n| && ` this.setModel(Models.createDeviceModel(), "device");` && |\n| &&