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 ={} , 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
Post a Comment