Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3585

SplitApp - how to get record selected

$
0
0

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);

 

  },

1.PNG

1.PNG

 

Please help and let me know how to reach complete record.

 

Thanks

Justin


Viewing all articles
Browse latest Browse all 3585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>