on 08-10-2017 8:54 AM
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Douglas Cezar Kuchler
Util.getObjectAPI just returns the standard object extensionAPI.
You must extend ObjectPageExtension to have this functionality.
Hope this helps!
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.