使用扩展方式隐藏SAP Fiori应用某个表格标签页的实际案例
发布日期:2021-06-30 14:24:50 浏览次数:2 分类:技术文章

本文共 1738 字,大约阅读时间需要 5 分钟。

Sample Overview

(1) developed via WebIDE: https://rde-fiori.dispatcher.neo.ondemand.com/index.html

(2) extension on standard Fiori application: My Opportunity
(3) source code could be found:https://github.com/i042416/testOpportunityExtension
(4) implemented feature: hide the standard tab “Participants”

Key points

(1) in Component.js, the following line is mandatory:

It is used to ensure all the source code of standard My Opportunity application are loaded with the path passed via fregisterModulePath method and stored in folder with structure as below ( Observed in Chrome development tool )

(2) in the source code automatically generated via WebIDE wizard, the standard Opportunity component is loaded with code below,

via function sap.ui.component.load:

Through my testing, I find it is not necessary, so I just comment it out ( red part ) as below, and use jQuery.sap.require to load the standard component instead ( green part ).

(3) The hidden of “Participants” tab is achieved via viewModifications as displayed below:

The id “salesTeam” could be found in S3.view.xml of Opportunity project:

(4) If you deploy the extension project to ABAP repository and configure it as Fiori launchpad tile, the index.html is not needed when you access your extension project via launchpad. However if you would like to test your extension project locally in WebIDE by selecting

“index.html” and click Run button in toolbar, then line 30 below is mandatory. It has the same purpose as the line mentioned in keypoint #one.

How to ensure your view modification take effect

Enter you extension project, now you could not see Participants tab in UI, and you could also observe the corresponding log in Chrome console.

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

转载地址:https://jerry.blog.csdn.net/article/details/107944025 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SAP Fiori应用没能从Fiori Launchpad启动的一个可能原因及分析过程
下一篇:使用Source Monitor检测Java代码的环复杂度

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月19日 00时21分40秒