Skip to content

Extending sap.fe controller, oData V4 #3118

Description

@jorgt

OpenUI5 version: 1.85.2

Browser/version (+device/version): Any

I'm trying to extend the controller of a V4 based application. The page map does not seem to support it, and the guided development only lists the options for V2 apps.

Steps to reproduce the problem:

  • Create a Fiori Elements V4 application List Report / Object page (which I understand is now part of OpenUI5)
  • Try extending a controller like a V2 app does not work, probably because it doesn't use the old template
"sap.suite.ui.generic.template.ListReport.view.ObjectPage": {
     "controllerName": "namespace.ObjectPage.Extension"
}
  • Try extending the sap.fe based controller:
"sap.fe.templates.ObjectPage.ObjectPageController": {
    "controllerName": "namespace.ObjectPage.Extension"
}

Errors:
error2
error1

oController in the above is indeed undefined.

The controller:

sap.ui.define(['sap/fe/templates/ObjectPage/ObjectPageController'], function(Controller) {
  'use strict';

  return Controller.extend("namespace.ObjectPage.Extension", {

  });
});

I have tried just declaring it without extending the ObjectPageController too, both in error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions