on 03-25-2022 9:59 PM
Hi,
I have a Fiori Elements ListReport/ObjectPage app and want to extend the controller of the ObjectPage.
Hence I added this to the manifest.json
"sap.ui5": {
...
"extends": {
"extensions": {
"sap.ui.controllerExtensions": {
"sap.suite.ui.generic.template.ObjectPage.view.Details": {
"controllerName": "de.tammenit.portal.ui.stammdaten.ext.Custom"
}
}
}
}
...
}
In folder "webapp/ext" I created a file "Custom.controller.js" with this content
sap.ui.define([], function() {
"use strict";
return {
onInit : function () {
console.log("samples.components.ext.customer.CustomMain - onInit");
},
doSomething: function() {
alert("this is a customer action");
}
}
});
When I run the application I would expect that my custom controller is merged into the ObjectPage.view.Details controller.
But my controller is not loaded and hence the onInit method is never called.
I also tried the "Controller Extension" approach described here: https://sapui5.hana.ondemand.com/#/topic/21515f09c0324218bb705b27407f5d61.html with no success.
Any suggestions?
Thanks Helmut
I don't see anything wrong in your extension controller. This extension controller will load only when you navigate to the Object Page for the first time. If you are expecting this extension controller to load when you load the app, it won't as it is meant to extend Object Page view controller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.