繁体   English   中英

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

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

我想创建一个外壳插件应用程序,以向启动板添加其他功能。 我参考了以下sap文档https://help.sap.com/viewer/8422cb487c2146999a2a7dab9cc85cf7/Cloud/en-US/87764543e31247b5b471c06e3f6da6fc.html 我想知道到底需要将什么传递给url参数? 如果有人可以提供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

您在提到的链接中看到的是Component.js中的示例代码,该示例代码用于每15分钟对服务器执行一次ping操作,以使用户的会话得到扩展(不会超时)。 该URL可以是(网关)服务器上的任何有效(未缓存)链接。

基于所需的附加功能,您将在Component.js中编写完全不同的代码。

我认为您想创建一个Fiori Launchpad插件,以将功能附加到Fiori Launchpad(FLP)。

这样的插件将在FLP Shell容器中呈现代表FLP的DOM对象。 由于无法确定何时渲染插件,因此您可以在插件代码中的component.js的init()函数中监听适当的Promise或事件异步。

与UI5版本1.60一样,如果您有权访问基于云的IDE,则可以从SAP WebIDE中的模板创建此类插件。 如果是这样,请访问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