SAP Fiori Elements 本地項目裏的 Annotations.xml,能夠定義一些本地 annotations,來覆蓋掉來自後臺 OData 服務裏的註解。spa
例如:我在 Annotations.xml 裏從新定義 List Report 裏應該顯示的表項:code
<Annotations Target="SAP.SEPMRA_C_PD_ProductType"> <Annotation Term="UI.LineItem"> <Collection> <Record Type="UI.DataFieldForAction"> <PropertyValue Property="Label" String="點我"/> <PropertyValue Property="Action" String="SEPMRA_PROD_MAN.SEPMRA_PROD_MAN_Entities/SEPMRA_C_PD_ProductCopy"/> <PropertyValue Property="InvocationGrouping" EnumMember="UI.OperationGroupingType/Isolated"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="ProductForEdit"/> <PropertyValue Property="Label" String="12345"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="MainProductCategory"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/> </Record> </Collection> </Annotation> </Annotations>
上面的代碼從新定義了 Copy 按鈕的標籤,同時 List Report 默認只顯示兩個表項:Product 和 MainProductCategory,同時將 Product 的 Label 更改成 12345,運行時效果:xml
可是咱們仍然能夠經過配置的方式,將其餘 column 一塊兒顯示出來:rem
如圖所示:get
更多Jerry的原創文章,盡在:"汪子熙":it