Skip to Content

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:

The following JavaScript code allows to set the visibility of the button controls:
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):

https://blogs.sap.com/2016/12/27/extend-abpm-with-pdf.js-a-pdf-viewer-that-runs-inside-different-browser-environments/

After deployment the top header button row should look like this:

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply