I'm trying to make a simple controller extension, which would hook onto a method when user clicks a button. The name of this method is "onClickActionC_MaintenanceJobWorkItemTPHeader1."
I've tried the following code, and several variations, trying to get a simple console.log message, but I can't get any of the methods below to trigger. Is there something I'm missing in order to get any of the below methods to trigger after their respective base controller methods are called?
sap.ui.define(
[
'sap/ui/core/mvc/ControllerExtension',
'sap/ui/core/mvc/OverrideExecution'
],
function (
ControllerExtension,
OverrideExecution //,Dialog, Button, mobileLibrary
) {
console.log("testing 1");
"use strict";
return ControllerExtension.extend("customer.zperform.maintenance.jobs.PopupMessage", {
metadata: {
methods: {
onclick: {
public: true,
final: false,
overrideExecution: "After",
},
onmousedown: {
public: true,
final: false,
overrideExecution: "After",
},
onClickActionC_MaintenanceJobWorkItemTPHeader1: {
public: true,
final: false,
overrideExecution: "After",
},
}
},
override: {
onclick: function (oEvent) {
console.log("testing 2");
},
onmousedown: function (oEvent) {
console.log("testing 2");
},
onClickActionC_MaintenanceJobWorkItemTPHeader1: function (oEvent) {
console.log("testing 2");
}
}
});
}
)
Manifest:
{
"fileName": "manifest",
"layer": "CUSTOMER_BASE",
"fileType": "appdescr_variant",
"reference": "i2d.eam.perfmaintjobs.manages1",
"id": "customer.zperform.maintenance.jobs",
"namespace": "apps/i2d.eam.perfmaintjobs.manages1/appVariants/customer.zperform.maintenance.jobs/",
"version": "0.1.0",
"content": [
{
"changeType": "appdescr_ui5_addNewModelEnhanceWith",
"content": {
"modelId": "i18n"
},
"texts": {
"i18n": "i18n/i18n.properties"
}
},
{
"changeType": "appdescr_ui5_addNewModelEnhanceWith",
"content": {
"modelId": "@i18n"
},
"texts": {
"i18n": "i18n/i18n.properties"
}
},
{
"changeType": "appdescr_ui5_addNewModelEnhanceWith",
"content": {
"modelId": "i18n|sap.suite.ui.generic.template.ListReport|C_MaintenanceJobWorkItemTP"
},
"texts": {
"i18n": "i18n/ListReport/C_MaintenanceJobWorkItemTP/i18n.properties"
}
},
{
"changeType": "appdescr_ui5_addNewModelEnhanceWith",
"content": {
"modelId": "i18n|sap.suite.ui.generic.template.ObjectPage|C_MaintenanceJobWorkItemTP"
},
"texts": {
"i18n": "i18n/ObjectPage/C_MaintenanceJobWorkItemTP/i18n.properties"
}
},
{
"changeType": "appdescr_ui5_addNewModelEnhanceWith",
"content": {
"modelId": "i18n|sap.suite.ui.generic.template.ObjectPage|C_MaintenanceJobTP"
},
"texts": {
"i18n": "i18n/ObjectPage/C_MaintenanceJobTP/i18n.properties"
}
},
{
"changeType": "appdescr_ui5_setMinUI5Version",
"content": {
"minUI5Version": "1.108.38"
}
},
{
"changeType": "appdescr_app_setTitle",
"content": {},
"texts": {
"i18n": "i18n/i18n.properties"
}
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.