on 07-02-2022 2:33 PM
In case we created a CDS view, generated a Business Object (BOPF) for it, exposed via OData using annotations and created Fiori Element List Report application based on this service.
In the Object Page for EDIT button :
Hi Nadeem,
I supposed that you can disable on BOPF and automaticly It will be invisible, but also you can do this in your IDE.
Extend a Controller to ObjectPage and in onInit, set this code:
"sap/suite/ui/generic/template/extensionAPI/extensionAPI"
onInit: function () {
ExtensionAPI.getExtensionAPIPromise(this.getView()).then(function (oExtensionAPI) {
oExtensionAPI.attachPageDataLoaded(function (event) {
this.getView().byId('edit').setVisible(false);
}.bind(this));
}.bind(this))
}
Regards, Luiz Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get the status and valid to set visible or not, like this:
var sPath = event.context.sPath,
oData = event.context.getModel().getProperty(sPath);
if( oData.status === true ) this.getView().byId('edit').setVisible(false);
else this.getView().byId('edit').setVisible(true);
Regards, Luiz Eduardo
User | Count |
---|---|
80 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.