cancel
Showing results for 
Search instead for 
Did you mean: 

basePublicMethod is not being called in controller extension

chetan_shah9
Explorer
0 Kudos
277

Hi Team -

We have a requirement to bring up a message box while changing order status in F2173 - Find Maintenance Order and Operation. We have created an adaptation project to create a controller extension to try to achieve this requirement.

The lifecycle events are been overridden and being invoked in extension controller, However the basePublicMethodis not being called/invoked.

sap.ui.define(['sap/ui/core/mvc/ControllerExtension', 'sap/ui/core/mvc/OverrideExecution'], function(ControllerExtension, OverrideExecution) {
    "use strict";
    return ControllerExtension.extend("customer.app.variant1.CloseConfirmationController", {
        metadata: {
            methods: {
                onInit: {
                    public: true /*default*/ ,
                    final: false /*default*/ ,
                    overrideExecution: OverrideExecution.Before
                },
                onCompleteTechnicalPressed: {
                    public: true /*default*/ ,
                    final: false /*default*/ ,
                    overrideExecution: OverrideExecution.Before
                },
            }
        },
        override: {
            onInit: function() {
                alert("oninit -> This runs")
            },
            onCompleteTechnicalPressed: function() {
                alert("onCompleteTechnicalPressed  -> This doesn't run")
            }
        }
    });
});<br>

Accepted Solutions (0)

Answers (0)