-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseController.js
28 lines (25 loc) · 1.05 KB
/
BaseController.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
sap.ui.define(["sap/ui/core/mvc/Controller"],
function(Controller) {
"use strict";
return Controller.extend("BurhanRehber.BaseController", {
getRouter: function() {
return sap.ui.core.UIComponent.getRouterFor(this);
},
getModel: function(sName) {
return this.getView().getModel(sName);
},
setModel: function(oModel, sName) {
return this.getView().setModel(oModel, sName);
},
getResourceBundle: function(value) {
return this.getOwnerComponent().getModel("i18n").getResourceBundle(value);
},
getI18nText: function(value) {
return this.getView().getModel("i18n").getResourceBundle().getText(value);
},
onShareEmailPress: function() {
var oViewModel = (this.getModel("objectView") || this.getModel("worklistView"));
sap.m.URLHelper.triggerEmail(null, oViewModel.getProperty("/shareSendEmailSubject"), oViewModel.getProperty("/shareSendEmailMessage"));
},
});
});