cancel
Showing results for 
Search instead for 
Did you mean: 

Adding SubHeader to Fiori Launchpad

patrick_weyers
Participant
0 Kudos
420

Hello,

I'm trying to add a custom SubHeader to the Fiori Launchpad, as referenced in:

Adding a Sub Header - SAP Fiori Launchpad - SAP Library

I've added the code from the example to the FioriLaunchpad.html at what I thought was the correct line for this.

However, when I run this, I get an error in the Chrome console saying:

2016-01-15 10:25:57 Call to success handler failed: sap.ushell.Container.getRenderer is not a function - TypeError: sap.ushell.Container.getRenderer is not a function

    at main

Does anyone know how to add a custom sub header successfully?

Thanks and regards

Patrick

Accepted Solutions (0)

Answers (1)

Answers (1)

patrick_weyers
Participant
0 Kudos

Is this the wrong forum for that kind of question?

If anyone could guide me to the right place to ask this question, I'd be very grateful!

Thank you and regards

Patrick

agentry_src
Active Contributor
0 Kudos

Hi Patrick,

Adding a link to which will allow members of that community to view this Discussion.  From what I see, this would be appropriate either there or here in the SAPUI5 DC community.  Be advised that yesterday was a US holiday plus the weekend may have limited the exposure of your thread.  You will probably get more responses shortly.

Cheers, Mike (Moderator)

SAP Technology RIG

patrick_weyers
Participant
0 Kudos

Thanks, Mike!

jamie_cawley
Advisor
Advisor
0 Kudos

Looks like it should be something like

sap.ushell.renderers.fiori2.Renderer().addSubHeader("sap.m.Bar", {id: "testBar"}, true, true);

Regards,

Jamie

SAP - Technology RIG

patrick_weyers
Participant
0 Kudos

Thanks, Jamie!

When I insert that line where I believe it should go, I get:

2016-01-20 17:41:43 Call to success handler failed: this._destroyCreatedInstances is not a function - TypeError: this._destroyCreatedInstances is not a function

    at Object.C.extend.constructor (https://beduss54.dev.***********.com:8007/sap/bc/ui5_ui5/ui2/ushell/resources/sap/fiori/core-min-1.j...)

    at Object.f [as Renderer]

The code is now (bold is my insertion):

// clean fiori loading screen markup before placing main content
                 var oContent = sap.ushell.Container.createRenderer("fiori2");
                sap.ushell.renderers.fiori2.Renderer().addSubHeader("sap.m.Bar", {id: "testBar"}, true, true);
                 jQuery("#canvas").empty();
                 setTimeout(function () {
                     // load   and register Fiori2 icon font
                     jQuery.sap.require("sap.ushell.iconfonts");
                     sap.ushell.iconfonts.registerFiori2IconFont();
                     oContent.placeAt("canvas");
                 }, 1);

jamie_cawley
Advisor
Advisor
0 Kudos

Use the reference to oContent

oContent.addSubHeader("sap.m.Bar", {id: "testBar"}, true, true);


Regards,

Jamie

SAP - Technology RIG