Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

unable to retrieve data during runtime

$
0
0

Hi Experts,

 

I am new to UI5 and so need your guidance. I am creating a app for which i have a odata to fetch data from back-end and simply display it in a list.

I am using XML views.

The main issue that i am facing is that, i am able to print the data on list but not able to get the data using oModel().list().

Below is the code:

 

var mConfig = this.getMetadata().getConfig();

 

  var oRootPath = jQuery.sap.getModulePath("com.fOne");

 

  var i18nModel = new sap.ui.model.resource.ResourceModel({

  bundleUrl : [ oRootPath, mConfig.resourceBundle ].join("/")

  });

  this.setModel(i18nModel, "i18n");

 

  var sServiceUrl = mConfig.serviceConfig.serviceUrl;

  var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl);

  this.setModel(oModel);

 

On debugging, oModel is filled up but as soon as data gets printed, oModel() gets emptied.


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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