Skip to Content
0

Fiori launchpad extensibility for on-premise gateway

May 03, 2017 at 04:01 PM

342

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
saurabh vakil May 04, 2017 at 07:12 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Krishna Kishor Kammaje
May 04, 2017 at 03:56 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

capture.png (39.1 kB)
0
avatar image
Former Member Jul 05, 2017 at 01:29 AM
0

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!


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Shujein,

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

Regards,

Saurabh

capture.png (20.1 kB)
0