使用View modification擴充套件SAP Fiori應用的一個案例

i042416發表於2020-09-11

This document gives a short introduction about how a field is hidden in the runtime by view modification. If you would like to know the “magic” occurred behind the scene, you could find them in this document.

In order to hidden the tab “Participants”, we have to first identify the technical id of this tab: salesTeam


使用View modification擴充套件SAP Fiori應用的一個案例


And then hidden the field via view modification.


使用View modification擴充套件SAP Fiori應用的一個案例


Runtime implementation

(1) the view Modification we defined in the extension component’s component.js is loaded in the runtime.


使用View modification擴充套件SAP Fiori應用的一個案例


(2) All the controls defined in opportunity detail view (an xml view ) are rendered one by one. As this is an xml view, the method in XMLTemplateProcessor.js is called. The screenshot below shows the time-slot when the “Participants” tab is to be rendered. Check all the attributes at this time in variable mSettings: there is no attribute like visible yet.


使用View modification擴充套件SAP Fiori應用的一個案例


(3) Then the visible configuration parsed from step 1 is merged into standard settings mSettings via the jQuery.extend method:


使用View modification擴充套件SAP Fiori應用的一個案例


Final settings for “Participants” tab:


使用View modification擴充套件SAP Fiori應用的一個案例


(4) loop all attributes of current tab, when visible attribute is iterated, set the property “visible” to value “false” in line 897, so the tab is invisible in the final rendered html page.


使用View modification擴充套件SAP Fiori應用的一個案例


要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

使用View modification擴充套件SAP Fiori應用的一個案例


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2718723/,如需轉載,請註明出處,否則將追究法律責任。

相關文章