SAP UI5:属性 通过自定义绑定 table
SAP UI5: Property binding via customizing table
我正在尝试实现一个 UI5 应用程序,其中在我的视图中每个控件的可见性和可编辑性都可以通过我们的 SAP ERP 中的自定义 table 进行控制。
此时我的想法是一个实体类型,其中包含每个属性的这些信息。因此,我的实体确实有两个额外的属性来控制可见性和可编辑性。例如:
- 个人
- 个人形象
- 个人编辑
- 姓氏
- 姓氏
- 姓氏编辑
- ...(依此类推)...
这个概念可行,但它会使我的实体膨胀。对我来说,它看起来更像是一种变通方法,而不是一种精心设计的策略。
有没有人遇到过这样的情况?
过去两年,事实证明复杂类型是解决这个问题最灵活的方法。
正如 Marc 所写,这正是我们今天的做法。
I am sorry for the confusion. Our entities (e.g. Employee) consist of several complex types. Each complex type (e.g. Status) has a value (e.g. 5) and sometimes a descr (e.g. declined) (and sometimes multiple values + descr). The name of the complex type (e.g. Status) can then be the key to get the corresponding config set. The config set stores the editability, visibility and a translated label of all properties from a single complex type.
我正在尝试实现一个 UI5 应用程序,其中在我的视图中每个控件的可见性和可编辑性都可以通过我们的 SAP ERP 中的自定义 table 进行控制。
此时我的想法是一个实体类型,其中包含每个属性的这些信息。因此,我的实体确实有两个额外的属性来控制可见性和可编辑性。例如:
- 个人
- 个人形象
- 个人编辑
- 姓氏
- 姓氏
- 姓氏编辑
- ...(依此类推)...
这个概念可行,但它会使我的实体膨胀。对我来说,它看起来更像是一种变通方法,而不是一种精心设计的策略。
有没有人遇到过这样的情况?
过去两年,事实证明复杂类型是解决这个问题最灵活的方法。
正如 Marc 所写,这正是我们今天的做法。
I am sorry for the confusion. Our entities (e.g. Employee) consist of several complex types. Each complex type (e.g. Status) has a value (e.g. 5) and sometimes a descr (e.g. declined) (and sometimes multiple values + descr). The name of the complex type (e.g. Status) can then be the key to get the corresponding config set. The config set stores the editability, visibility and a translated label of all properties from a single complex type.