-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComponent.js
34 lines (29 loc) · 1.17 KB
/
Component.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/model/json/JSONModel",
"sap/ui/Device"
], function (UIComponent, JSONModel, Device) {
"use strict";
return UIComponent.extend("sap.ui.entelantenas.Component", {
metadata : {
manifest: "json"
},
init : function () {
// call the init function of the parent
UIComponent.prototype.init.apply(this, arguments);
// set data model
this.getRouter().initialize();
// set device model
var oDeviceModel = new JSONModel(Device);
oDeviceModel.setDefaultBindingMode("OneWay");
this.setModel(oDeviceModel, "device");
// jQuery.sap.registerModulePath("appbarra", "../AppBarra");
/*var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData("model/mockdata/products.json");
this.setModel(oModel);*/
// var url = "http://sap-fiori-t77.t77secure.biz:50000/sap/opu/odata/sap/ZLIBERA_PEDIDOS_SRV/";
// var oModel = new sap.ui.model.odata.ODataModel(url, true, "ffarro", "inicio02");
// this.setModel(oModel);
}
});
});