1
votes

We've app/page that is running from a long time without any intervention... But now we're getting an error every time we execute the .getBindingContext() on the Detail Screen (Master Detail app).

savelikes: function (evt) {
  bundle = this.getView().getModel("i18n").getResourceBundle();
  var oView = this.getView();
  // evt.getSource().getSelectedItem().getBindingContext("modelData").getObject();
  var bindingContext = this.getView().getBindingContext();
  var me1 = this.getView().getBindingContext().getModel();
  var me2 = this.getView().getBindingContext().getPath();
  // ...
},

Error message:

Print screen


PS: We are not running the libraries locally, we're bootstrapping from the OpenUI5 (on index.html) with the URL: https://openui5.hana.ondemand.com/resources/sap-ui-core.js.

Any clues?

1
Do you use a name to your model e.g "modelData". If so, try to get the context using the model name like getBindingContext("modelData"). - Nandan Chaturvedi
Does this answer your question? getBindingContext() returns undefined - Boghyon Hoffmann

1 Answers

0
votes

Something changed on the latest OpenUI5 release...

I've changed the bootstrap to https://openui5.hana.ondemand.com/1.52.11/resources/sap-ui-core.js and it works again...