Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onInit: function() {
- var sServiceUrl = this.getOwnerComponent().getMetadata().getManifestEntry("sap.app").dataSources["zdemo_app"].uri;
- var OdataModel = new sap.ui.model.odata.v2.ODataModel(sServiceUrl);
- var oModel = new sap.ui.model.json.JSONModel();
- var sPath = "/PersonSet";
- OdataModel.read(sPath, {
- success: function(oData, response) {
- oModel.setData(oData);
- }
- });
- this.getView().setModel(oModel, "person");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement