I have a detail page (Master/Detail), where I get the key of a model as a parameter:
onRoutePatternMatched : function(oEvent) {
var key= oEvent.getParameter("arguments").key;
var oViewModel = this.getView().getModel("model");
var _sProductPath = "model>/ZSDATLOG_MACHMODELSet('" + key+ "')";
this.getView().setBindingContext(oViewModel);
this.getView().bindElement({
path: _sProductPath
});
Now I successfully display the detail data in the view.
Now I want to read the current row of the model in a further function of the controller.
btnPress : function() {
var context = this.getView().getBindingContext();
var object = context.getProperty("/");
With this code I nearly get my elements:
Now that object is in my variable object
.
How should I get the attribute Agr
?