on 2023 Oct 09 2:03 PM
Hello ,
I need to add custom action in footer for Fiori Elements - Object Page.
With the help of Page map in BAS , I am able to generate ListReportExtention.js file as following , however it does not bind to the controller and not allowing to close the dialog.
Please help with the best possible way to carry out custom action in footer for fiori elements - Object Page.
Request clarification before answering.
I found the way to achieve with the controller code within the ListReportExt.js file.
Please find the sample code : https://github.com/SAP-samples/cloud-cap-samples-java/blob/main/app/admin/webapp/extension/Upload.js
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Brijesh!
Are you using OData V2, or OData V4?
There is also some confusion about Object page (title) vs. list report (ListReportExtention) - where do you want to see the extension?
For OData V4 you can find various examples at the FPM Explorer - maybe you can compare your coding with the examples that you can find here.
But it would also be interesting for us to know why the code as generated from the Page Map did not work as expected. Could you please open a ticket in Service Now for us, on component CA-UX-IDE?
Thanks & regards,
Stefan Schreck
(Fiori Tools)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I tried by myself: at the moment, the Page Map only supports adding custom actions at Object Pages of OData V4 apps.
The generated default code looks like in the following example. When I tested the app preview, the message toast appeared, but then hides automatically after a few seconds. This is the exact behavior as described at https://ui5.sap.com/#/api/sap.m.MessageToast.
If you face some problem with the message toast, you should rather address to the UI5 component CA-UI5-CTR.
sap.ui.define([
"sap/m/MessageToast"
], function(MessageToast) {
'use strict';
return {
press: function(oEvent) {
MessageToast.show("Custom handler invoked.");
}
};
});
OK, if it is a binding problem of your controller, maybe the examples from https://ui5.sap.com/#/entity/sap.m.Dialog/sample/sap.m.sample.DialogMessage/code can help? Here, the controller is explicitly specified in a mvc view
make sure this.byId find the dialog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.