1
votes

I need to be able to retrieve binding context + path from StandardListItem in a list.

However, getBindingContext() returns undefined...

I've search for the oBindingContexts property with oSource of oEvent and and it is there.

onJobPress: function(oEvent) {
  var oSource = oEvent.getSource();
  var oBindingContext = oSource.getBindingContext(); // undefined
  var oPath = oBindingContext.getPath(); // error
  var data = oBindingContext.getProperty(oPath); // error
  // ...
},
1
Does this answer your question? getBindingContext() returns undefined - Boghyon Hoffmann

1 Answers

0
votes

Have you used a named model? Then it would be:

oSource.getBindingContext("modelName");