zoukankan      html  css  js  c++  java
  • SAP Fiori Elements 本地项目的 annotations.xml 文件

    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的原创文章,尽在:"汪子熙":

  • 相关阅读:
    自定义导航全屏滑动返回上一页
    快速tab应用
    一种透明效果的view
    10.11 pod 安装
    GIT本地操作
    Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim is not owned by root.
    bt5r3开启远程登录
    神奇的脚本1
    pt-table-checksum和pt-table-sync
    http://blog.sae.sina.com.cn/archives/881
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/14748961.html
Copyright © 2011-2022 走看看