The UI usually uses data binding to bind UI controls to the model, which holds the application data, so that the controls are updated automatically whenever application data is changed.
onInit: function() {
var sServiceUrl = "https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV");
var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, true, "user", "psw");
sap.ui.getCore().setModel(oModel);
}
Here ServiceURL is oData Service url that should provide XML with list of collection available in the service.
OData Tutorial
Working Demo