SAP Fiori Elements 本地我的项目里的 Annotations.xml,能够定义一些本地 annotations,来笼罩掉来自后盾 OData 服务里的注解。

例如:我在 Annotations.xml 里从新定义 List Report 里应该显示的表项:

 <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,运行时成果:

然而咱们依然能够通过配置的形式,将其余 column 一起显示进去:

如图所示:

更多Jerry的原创文章,尽在:"汪子熙":