sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/EventBus",
"sap/ui/model/json/JSONModel"
],function(Controller,EventBus,JSONModel){
"use strict";
return Controller.extend("sap.ui.myApp.controller.App",{
onInit:function(){
},
});
});sap.ui.controller("sap.ui.myApp.controller.one", {
/**
* Called when a controller is instantiated and its View controls (if available) are already created.
* Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
* @memberOf example_two.one
*/
onInit: function() {
},
/**
* Similar to onAfterRendering, but this hook is invoked before the controller's View is re-rendered
* (NOT before the first rendering! onInit() is used for that one!).
* @memberOf example_two.one
*/
onBeforeRendering: function() {
},
/**
* Called when the View has been rendered (so its HTML is part of the document). Post-rendering manipulations of the HTML could be done here.
* This hook is the same one that SAPUI5 controls get after being rendered.
* @memberOf example_two.one
*/
onAfterRendering: function() {
},
/**
* Called when the Controller is destroyed. Use this one to free resources and finalize activities.
* @memberOf example_two.one
*/
onExit: function() {
}
});sap.ui.define([
"sap/ui/core/mvc/Controller"
], function (Controller) {
"use strict";
return Controller.extend("sap.ui.myApp..controller.BaseController", {
/**
* Convenience method for accessing the router.
* @public
* @returns {sap.ui.core.routing.Router} the router for this component
*/
getRouter : function () {
return sap.ui.core.UIComponent.getRouterFor(this);
},
/**
* Convenience method for getting the view model by name.
* @public
* @param {string} [sName] the model name
* @returns {sap.ui.model.Model} the model instance
*/
getModel : function (sName) {
return this.getView().getModel(sName);
},
/**
* Convenience method for setting the view model.
* @public
* @param {sap.ui.model.Model} oModel the model instance
* @param {string} sName the model name
* @returns {sap.ui.mvc.View} the view instance
*/
setModel : function (oModel, sName) {
return this.getView().setModel(oModel, sName);
},
/**
* Getter for the resource bundle.
* @public
* @returns {sap.ui.model.resource.ResourceModel} the resourceModel of the component
*/
getResourceBundle : function () {
return this.getOwnerComponent().getModel("i18n").getResourceBundle();
},
/**
* Event handler when the share by E-Mail button has been clicked
* @public
*/
onShareEmailPress : function () {
var oViewModel = (this.getModel("objectView") || this.getModel("worklistView"));
sap.m.URLHelper.triggerEmail(
null,
oViewModel.getProperty("/shareSendEmailSubject"),
oViewModel.getProperty("/shareSendEmailMessage")
);
}
});
}
);sap.ui.define([
"wave/reports/controller/BaseController"
], function(BaseController) {
"use strict";
return BaseController.extend("sap.ui.myApp.controller.contRoller", {
//Your controller code
});
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 33 | |
| 21 | |
| 18 | |
| 16 | |
| 12 | |
| 10 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |