on 04-15-2022 4:56 PM
I'm creating a list report with selection using Fiori element.
I have created annotation extension to my CDS.
I would like to disable the option to navigate to object page.
How can I do that with annotation in CDS (or in VS code annotation)
Thanks for your support.
See documentation at https://sapui5.hana.ondemand.com/sdk/#/topic/2c65f07f44094012a511d6bd83f50f2d.html
You can control whether it is possible to navigate to a detail page.
It simply depends on whether you keep the predefined definition of a subpage:
In the manifest defenition you can see
// Navigation to detail page: eliminate this block if no navigation is needed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure if this is possible via annotations. This seems more like a possible frontend breakout to me.
This should be the solution for you:
sap.ui.controller("your.application.name.ext.controller.ListReportExt", {
onBeforeRebindTableExtension: function (oEvent) {
var oBindingParams = oEvent.getParameter("bindingParams");
oBindingParams.events = {
"dataReceived": function () {
this.oSmartTable = sap.ui.getCore().byId("your.application.name::sap.suite.ui.generic.template.ListReport.view.ListReport::C_CDS_VIEW_NAME--listReport");
this.oTableRows = this.oSmartTable.getTable().getItems();
this.oTableRows.forEach(function (oRow) {
oRow.setType(sap.m.ListType.Inactive);
});
},
};
},
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
7 | |
7 | |
6 | |
6 | |
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.