Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onInit:function (){
- this._oBusyDialog = new sap.ui.core.BusyIndicator.show(0);
- 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) {
- //this.getView().setModel(oData, "person");
- if (this._oBusyDialog) {
- sap.ui.core.BusyIndicator.hide();
- }
- oModel.setData(oData);
- //var oTempResult = oData.results;
- }.bind(this)
- });
- this.getView().setModel(oModel, "person");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement