javascript - sapui5 JSON model and display in xml -


i need setting json model main model. have data stored in "http://localhost:9041/main-app-web/myservicename.svc/getsurname?id=1&name='matt'&$format=json"

now want set model, i'm trying

var omodeljs = new sap.ui.model.json.jsonmodel("/main-app-web/myservicename.svc/getsurname?id=1&name='matt'&$format=json"); this.getview().setmodel(omodeljs, "model"); 

but giving me odata ={} , enter image description here empty odata in debugger. how , display data eg. in table in xml?

parameters stored in json:

id: "223", meternumber: "1354-65498121" 

ty guys

this.getview().setmodel(omodeljs, "model"); 

the above line of code not needed.

next yo have table id , set model table.

this.getview().byid("tableid").setmodel(omodeljs); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -