Skip to Content
avatar image
Former Member

Extending Fiori Smart Template App

Hi,

I've created an app using CDS annotations and a fiori smart template. I'm trying to extend this app. In particular I need to extend the functionality around the Object Page (sap.suite.ui.generic.template.ObjectPage) Edit button (to do some additional checks before update).

I can't seem to find where I can do this. I've found the onEdit functionality in ControllerImplementation.js

and I have noticed that this has an ExtensionAPI

But I don't know where to start in coding my extension (in particular what to add into my manifest.json file to implement.

I've found the attached help but need a bit more detail!

API for developers of smart template extensions

Any assistance would be greatly appreciated, thanks

Andrew

pic1.jpg (63.9 kB)
pic2.jpg (42.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 14 at 02:10 PM

    Hi,
    I hope this still helps.

    If you want to create an extension, in the manifest.json, you should add your views and your controllers in the following way.

    ReplaceFacet can be AfterFacet or BeforeFacet too. Those are the tabs in the object page.

    In your controller, you have to register the extension API.

    Util.getObjectAPI(this.extensionapi) does return this.ObjectAPI.

    Then we attach the events we want to handle. (Cancel, save, pageDataLoaded, registerUnsavedDataCheckFunction).

    In your case, if you want to know when the EDIT button is clicked, then you should register for a change in the global model variable "/editable".
    In the onInit method, we do the following:


    Hope this helps!

    Add comment
    10|10000 characters needed characters exceeded