on 2025 Feb 13 6:06 PM
This is for SAPUI5 adaptation project on ui.ssuite.s2p.mm.pur.pr.prcss.s1.
I created a ControllerExtension js which overrides CreateButtonsEnableCheck method in the standard Worklist.controller.js. My intention is to add custom logic while keeping everything in the standard CreateButtonsEnableCheck intact. In this case, I just wanted to add messagebox.alert message before calling the standard CreateButtonsEnableCheck in the Worklist.controller.js.
Everything seems to be working. I was able to see that the messagebox alert gets triggered before calling the standard CreateButtonsEnableCheck in Worklist.controller.js. HOWEVER, now getSelectedContexts() within the standard CreateButtonsEnableCheck doesn't work anymore.
I'm guessing this is because of how I'm calling the standard CreateButtonsEnableCheck from the override section of my ControllerExtension js:
From Debugger (using my controllerextension):
notice functional location is different which causes it not to find getSelectedContext():
Do you have any idea on how to fix this?
Thanks
Request clarification before answering.
try this.
override: {
CreateButtonsEnableCheck: function(e, i) {
var that=this;
MessageBox.alert("Button Clicked...");
ui.ssuite.s2p.mm.pur.pr.prcss.s1.controller.Worklist.prototype.CreateButtonsEnableCheck.apply(that, arguments);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
53 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.