简体   繁体   English

如何在SAP UI5 / Fiori中创建Shell插件应用程序?

[英]How to create a shell plugin app in SAP UI5/Fiori?

I want to create a shell plugin app to add additional functionality to my launchpad. 我想创建一个外壳插件应用程序,以向启动板添加其他功能。 I referred to the following sap documentation https://help.sap.com/viewer/8422cb487c2146999a2a7dab9cc85cf7/Cloud/en-US/87764543e31247b5b471c06e3f6da6fc.html . 我参考了以下sap文档https://help.sap.com/viewer/8422cb487c2146999a2a7dab9cc85cf7/Cloud/en-US/87764543e31247b5b471c06e3f6da6fc.html I want to know what exactly needs to be passed to the url parameter here ? 我想知道到底需要将什么传递给url参数? If somebody could give an example url of the shell plugin it would be great. 如果有人可以提供shell插件的示例网址,那就太好了。

setInterval(function () {
            jQuery.ajax({
                type: "HEAD",
                cache: false,
                url: "the URL to the Component.js of the plugin"
            }).done(
                function (result) {
                    jQuery.sap.log.debug("pingServer", "Successfully pinged the server to extend the session");
                }
            ).fail(
                function () {
                    jQuery.sap.log.error("pingServer", "failed to ping the server to extend the session");
                }
            );
        }, 900000); //15 minutes

What you are seeing in the mentioned link is a sample code within Component.js which is used to ping the server every 15 minutes so that the user's session gets extended (does not timeout). 您在提到的链接中看到的是Component.js中的示例代码,该示例代码用于每15分钟对服务器执行一次ping操作,以使用户的会话得到扩展(不会超时)。 That URL can be any working (not cached) link on your (Gateway) server. 该URL可以是(网关)服务器上的任何有效(未缓存)链接。

Based on what you want as the additional functionality, you will be writing a completely different code within Component.js. 基于所需的附加功能,您将在Component.js中编写完全不同的代码。

I think you want to create a Fiori Launchpad Plugin, to enchance functionality to the Fiori Launchpad (FLP). 我认为您想创建一个Fiori Launchpad插件,以将功能附加到Fiori Launchpad(FLP)。

Such plugin will render within the FLP Shell container, the DOM object that represents the FLP. 这样的插件将在FLP Shell容器中呈现代表FLP的DOM对象。 As one cannot determine when plugins are rendered, you can listen to approriate promise or events async in the init() function of the component.js in the plugin's code. 由于无法确定何时渲染插件,因此您可以在插件代码中的component.js的init()函数中监听适当的Promise或事件异步。

As with UI5 version 1.60, it is possible to create such a plugin from a template in the SAP WebIDE, if you have access to this cloud based IDE. 与UI5版本1.60一样,如果您有权访问基于云的IDE,则可以从SAP WebIDE中的模板创建此类插件。 If so, check HELP/SAP.com for step-by-step description at https://help.sap.com/viewer/fb7108e0166c43d3900e8a609e129005/Cloud/en-US/ee0e48567c034991ac079eb93348d3b2.html 如果是这样,请访问https://help.sap.com/viewer/fb7108e0166c43d3900e8a609e129005/Cloud/en-US/ee0e48567c034991ac079eb93348d3b2.html检查HELP / SAP.com以获取分步说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM