on 2021 May 04 5:06 PM
Hello experts,
I am currently struggling with adding more than one custom button to the Fiori Launchpad Shell Header.
It should be possible with the method addHeaderEndItem of the sap.ushell.renderers.fiori2.Renderer and it worked fine with Fiori 2.0 (tested with UI5 version 1.60), but it does not seem to work with Fiori 3.0 (tested with UI5 version 1.71).
To reproduce the issue you can open a FLP Demo App, e.g. the Worklist App, open the browser console and execute following code:
var oRenderer = sap.ushell.Container.getRenderer("fiori2");
// First button (displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton",
icon: "sap-icon://action-settings",
visible: true
}, true, true);
// Second button (not displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton2",
icon: "sap-icon://world",
visible: true
}, true, true);
Only the first button will appear. Am I doing something wrong or is this a bug?
Since the code example of the method addHeaderEndItem also adds two buttons I assume that it should generally be possible to do so.
Thanks in advance,
Julia
Request clarification before answering.
Hello Julia, indeed, if this is still an issue for you and that you cannot rely on specific sapui5 runtime and patch versions, you may need to report an incident. kind regards; Piotr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Julia,
I have just come across your question and out of curiosity gave it a try using the following sapui5 patch (1.71.40).
I tested the below app with both Chrome and FireFox and executed the code in each browser's console window (after launching the worklist app).
Indeed, with sapui5 patch (1.71.36) the app exhibits the behaviour you describe above, however, with sapui5 patch (1.71.40) this is working fine and all the buttons will be added and retained as expected.
Thx; Piotr;
PS.
Here you go the Worklist-App-1.71.40 and the code to insert 4 additional buttons at the right of the shell FLP bar:
var oRenderer = sap.ushell.Container.getRenderer("fiori2");
// First button (displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton",
icon: "sap-icon://action-settings",
visible: true
}, true, true);
// Second button (displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton2",
icon: "sap-icon://world",
visible: true
}, true, true);
// Third button (displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton3",
icon: "sap-icon://world",
visible: true
}, true, true);
// 4th button (displayed)
oRenderer.addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {
id: "myTestButton4",
icon: "sap-icon://world",
visible: true
}, true, true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, it seems that the latest sapui5 versions including 1.98.0 exhibits the initial problem thus only allowing to add one single custom button.
If one tries out a demo app for instance, Manage Products App, only the first of the four buttons will be added to the shell FLP bar.
User | Count |
---|---|
80 | |
30 | |
9 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.