cancel
Showing results for 
Search instead for 
Did you mean: 

Custom buttons in Fiori Launchpad Shell Header - only one button possible since Fiori 3.0?

uifivvy
Participant
0 Kudos
1,587

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

Accepted Solutions (0)

Answers (2)

Answers (2)

quovadis
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

quovadis
Product and Topic Expert
Product and Topic Expert
0 Kudos

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);
quovadis
Product and Topic Expert
Product and Topic Expert

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.

uifivvy
Participant
0 Kudos

Hello Piotr,

thank you very much for your response, at least i can be sure now that it's indeed a bug.

Would you recommend reporting an incident in the SAP ONE Support Launchpad?

Kind regards,

Julia