Skip to Content
0

Uncaught Error Cannot read property 'getProperty' of undefinded

Jul 19, 2017 at 02:10 PM

146

avatar image
Former Member

I am working through some SAP tutorials and I have one that keeps giving me errors and I have resorted to copy paste exactly as shown in tutorial but I still cannot seam to get it.

Error from Chrome

Uncaught TypeError: Cannot read property 'getProperty' of undefined

at f.onShowHello (App.controler.js?eval1:12)

App.controller.js FILE

sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/m/MessageToast" ], function (Controller, MessageToast) { "use strict"; return Controller.extend("opensap.myapp.controller.App", { onShowHello: function () { // read msg from i18n model var oBundle = this.getView().getModel("i18n").getResourceBundle(); var sRecipient = this.getView().getModel("HelloPanel").getProperty("/recipient/name"); var sMsg = oBundle.getText("helloMsg", [sRecipient]); // show message MessageToast.show(sMsg); } }); });

I also have a Schema Error -Manifest.Jason "sap.ui5".models[keys35.0]- has additional properties

The file checks out on JSLint. here is the manifest sap.ui5 namespace

"sap.ui5": { "_version": "1.2.0", "rootView": { "viewName": "opensap.myapp.view.App", "type": "XML", "id": "app" }, "autoPrefixId": true, "dependencies": { "minUI5Version": "1.34", "libs": { "sap.ui.core": { "minVersion": "1.34.0" }, "sap.m": { "minVersion": "1.34.0" }, "sap.ui.layout": { "minVersion": "1.34.0" } } }, "models": { "helloPanel": { "type": "sap.ui.model.json.JSONModel", "url": "model/HelloPanel.json" }, "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "opensap.myapp.i18n.i18n" } } },

beginner

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Jul 19, 2017 at 02:10 PM
0

You are just stupid that not SAP's problem

Share
10 |10000 characters needed characters left characters exceeded