Hide default aBPM header buttons
Inside of the aBPM Framework exists a lot of features and functionalities that helps to realize a custom scenario very quickly, but sometimes some features like the feeds or the filter buttons in the top header button row are not necessary to display. Inside of the following blog you will find a solution to hide those buttons with some line of JavaScript code.
Use case:
The aBPM scenario is a “standalone” application (like a custom inbox, etc.) where no mandatory fields must be filtered nor feeds can be used for collaboration approaches. In such cases the aBPM default buttons should be disabled or hide.
Prerequisite:
aBPM V3.1
With aBPM V3.1 the buttons inside the top header button row gets a fix id for every button control. With those ids it is possible to get a reference to those elements and set the visibility of the SAPUI5 control very easy.
The following bullet point list gets an overview about the button elements:
- Feeds (id:Â formView–showHideFeedsButton)
- Details (id: formView–showHideDetailsButton)
- BusinessLog (id: formView–showBusinessLog)
- Filter (id: formView–showFilterSelectionButton)
Solution:
sap.ui.getCore().getElementById("formView--showHideFeedsButton").setVisible(false);
sap.ui.getCore().getElementById("formView--showHideDetailsButton").setVisible(false);
sap.ui.getCore().getElementById("formView--showBusinessLog").setVisible(false);
sap.ui.getCore().getElementById("formView--showFilterSelectionButton").setVisible(false);
Hint: This code snippet needs only to be loaded once if the UI will be initialized. A good place is the UI5TabletViewRenderer that was used in this example to insert those lines. An example for a custom UI5TabletViewRenderer can be found here (point 2):
After deployment the top header button row should look like this: