Hi
I am following some tutorials and am trying to create a sample splitapp application and am able to load records in master view. Now in Master controller I am trying to select the whole record, I am able to get spath or indivdual value like order/description but not to the complete record. It comes as null (var item below)
var oSelect = oEvent. getParameter("listItem");
var context1 = oSelect.getBindingContext();
var sp = context1.sPath;
var orId = context1.getProperty("order");
var item = sap.ui.getCore().getModel().getProperty(orId);
console.log(context1,sp,orId,item);
}
My json model is there in Master controller INIT method.
onInit: function() {
var oModel = new sap.ui.model.json.JSONModel("model/mock.json");
sap.ui.getCore().setModel(oModel);
},
Please help and let me know how to reach complete record.
Thanks
Justin