Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Controller example deprecated? #19

Description

@tobkle

The example in the OpenSAP Training does not or no longer work:
This part is not working:

onShareClick: function (oEvent) {
    var oExtensionApi = this.base.templateBaseExtension.getExtensionAPI();
...

this.base is not accessible, or do I miss a step before?

I suppose you need this instead?

sap.ui.define([
	'sap/ui/core/mvc/ControllerExtension',
        'sap/suite/ui/generic/template/extensionAPI/extensionAPI',     // ADD THIS
	],
	function (
		ControllerExtension,
                ExtensionAPI   // ADD THIS
	) {
		"use strict";
		return ControllerExtension.extend("customer.my-app-id.enhanced.myController", {

			onShareClick: (oEvent) => {
                               const oExtensionApi = ExtensionAPI.getExtensionAPI()    // CHANGE THIS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions