cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori launchpad extensibility for on-premise gateway

saurabh_vakil
Active Contributor
0 Kudos
1,324

Hi Experts,

I am following the openSAP course Building Portal Sites on SAP Cloud Platform and have implemented the launchpad extensibility app from Week 2 Unit 6 Extensibility. On deploying the shellplugin project to the SAP Cloud Platform I am adding this as an app of type Shell Plugin to my Fiori launchpad portal site - when I preview this site I can see the custom header and sub-header added through the project.

Below is the code in the Component.js file:

jQuery.sap.require("sap.m.MessageBox");
jQuery.sap.declare("myplugin.Component");
sap.ui.core.Component.extend("myplugin.Component", {
init: function() {
//Add reference to css 
jQuery.sap.includeStyleSheet(jQuery.sap.getModulePath("myplugin","/css/style.css"));

//Add Header title
this.setHeaderTitle("KPIT Technologies Fiori Launchpad");
//Add Subheader title
this.addSubHeader([
new sap.m.ToolbarSpacer(),
new sap.m.Text("mySubHeader_txt",{text: "Extending Fiori Launchpad using SAP Cloud Platform"}),
new sap.m.ToolbarSpacer()
new sap.m.Button({icon: "sap-icon://sys-help"}),
new sap.m.Button({icon: "sap-icon://address-book"}),
new sap.m.Button({icon: "sap-icon://marketing-campaign"})
]);
}, //End of init()

setHeaderTitle: function(title) {
var oRendererExtensions = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
if (oRendererExtensions) {
oRendererExtensions.setHeaderTitle(title);
}
},

addSubHeader: function(content) {
var oRendererExtensions = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
if (oRendererExtensions) {
var toolbar = new sap.m.Toolbar({
content: content
});
oRendererExtensions.addSubHeader(toolbar);
}
},

});

I have now deployed this app to my on-premise gateway system and created a custom Catalog and within the catalog a target mapping for the plugin app and assigned this to a PFCG role assigned to my test user. When I login to the launchpad with the test user I find that the custom header and sub-header I have added via the plugin does not appear on the launchpad.

My question is whether there is something additional I have to do to make the plugin work on the on-premise launchpad?

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_vakil
Active Contributor
0 Kudos

Hi Krishna,

The issue was resolved by changing the intent to Shell-plugin in the target mapping properties. Now the plugin gets loaded on the launchpad and also displays the changes I made.

Regards,

Saurabh

Answers (3)

Answers (3)

preeti_pradhan
Explorer
0 Kudos

Hi,

Is there any restriction on usage of this plugin with respect to SAP UI library version?

0 Kudos

Hi Saurabh,

I met the same problem about the Shell-Plugin into on-promise system, Could you please show me the target mapping properties about Shell-Plugin App?

Many thanks!

saurabh_vakil
Active Contributor
0 Kudos

Hello Shujein,

Below are the target mapping properties of the plugin that I got to work in my on-premise system.

Regards,

Saurabh

kammaje_cis
Active Contributor
0 Kudos

The problem might be with your catalog (or cache). Use developer tools (F12) and check if the plugin has actually loaded. (I doubt that).

saurabh_vakil
Active Contributor
0 Kudos

Hi Krishna,

Thanks for your response. When I open the launchpad with the test user I find that the plugin component is not getting loaded (by looking at the Network tab).

Below is what I have done so far:

  1. Deployed the shellplugin project to the gateway system.
  2. Created a catalog on the gateway in launchpad designer and in this catalog created a target mapping for the plugin app.
  3. Created a PFCG role on the gateway, added the above catalog in this role and assigned the role to the test user.

When I open the launchpad with the test user under Chrome's developer console I can see a service call https://<host>:<port>;/sap/bc/ui2/start_up?so=*&action=* which returns an entry corresponding to the semantic object-action associated with my plugin app. But still the plugin component does not get called in the launchpad.

I am wondering where I am going wrong/if I am missing something due to which the plugin doesn't get loaded.

Below is a screen shot of the target mapping within the catalog:

Regards,

Saurabh