How to read the object in UI5 with oData V4?
Basically I want to get the JSON object from the URL service:
Ths is my onInit function in the controller.
onInit: function() {
var this_ = this;
this.getView().addEventDelegate({
onBeforeShow: function(evt) {
var oModel = new sap.ui.model.json.JSONModel();
oModel = sap.ui.getCore().getModel("appid");
var app_id = oModel.getData().app_id;
this_.getView().bindElement({
path: "zearnModel>/zearn_summary(" + app_id + ")"
});
}
});
}