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

UI5 view in JSON

$
0
0

Hello Everyone,

 

So far I have tried JS version of UI5 views but I was recently trying to run a simple application that has data defined in view and display in html file. I have defined a dummy data as follows in .View file

 

{    "Type":"sap.ui.core.mvc.JSONView",    "controllerName":"ui5_json.UI5_JSON",    "content": [
{ "firstName":"John" , "lastName":"Doe" }, 
{ "firstName":"Anna" , "lastName":"Smith" }, 
{ "firstName":"Peter" , "lastName":"Jones" }    ]
}

However, I have no clue about how to read this data in index.html file? I have tried defining JSON data in html file itself but haven't tried anything like this.

 

Can anyone help me & explain how to display this data. Also, is it incorrect to have data in a .View file? In that case, how should one work with JSON based views? I am all confused right now.

 

 

Best,

Ameya


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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