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

Re: UIComponent's Model can not be accessed in View-Controller

$
0
0

Dominik,

 

I guess your model is like this, Stories as the parent.

var oStoryModel = {Stories:[  {},  {},  {},  {}]};

While setting the model, try like this and check you will be able to read oModel.getData()

var oStoryModel = new JSONModel(jQuery.sap.getModulePath(sNamespace, oConfig.storiesLocal));
this.setModel(oStoryModel.oData.Stories, "stories");

(or) having the same existing model, you can try like this -


oModel.getData().Stories

Regards,

Sai Vellanki.


Viewing all articles
Browse latest Browse all 8372

Trending Articles



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