簡體   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