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

json file getModel().getProperty

$
0
0

Team

 

i have the following code in component.js

 

 

 

  var oModel2 = new sap.ui.model.json.JSONModel(jQuery.sap.getModulePath("sap.ui.demo.chart.model", "/product.json"));

  this.getView().setModel(oModel2,"productsl");

 

while checking in debug mode i can see that the file is in pending status and after screen rendered...i can see the response the file content as well.

wanted to check how do i access the above object.

 

i tried the below... but cannot see any value...

 

this.getView().getModel().getProperty("products")


any pointers would be great...


below is the json file sample record...


"ProductCollection": [

  {

  "ProductId": "1239102",

  "Name": "Power Projector 4713",

  "Category": "Projector",

  "SupplierName": "Titanium",

  "Description": "A very powerful projector with special features for Internet usability, USB",

  "WeightMeasure": 1467,

  "WeightUnit": "g",

  "Price": 856.49,

  "CurrencyCode": "EUR",

  "Status": "Available",

  "Quantity": 3,

  "UoM": "PC",

  "Width": 51,

  "Depth": 42,

  "Height": 18,

  "DimUnit": "cm",

  "ProductPicUrl": "https://openui5.hana.ondemand.com/test-resources/sap/ui/demokit/explored/img/HT-6100.jpg"

  },

 

 

thanks


Viewing all articles
Browse latest Browse all 3548

Trending Articles



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