Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Association and Aggregation methods used by UI5

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is UI5 using Association and Aggregation methods". In daily operation, I believe many people have doubts about what UI5 uses Association and Aggregation methods. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "what is UI5 using Association and Aggregation methods?" Next, please follow the editor to study!

UI5

UI5 uses Association and Aggregation to describe the relationship between controls.

Aggregation:parent and child controls have dependencies on lifecycle:

When a ManagedObject is destroyed, all aggregated objects are destroyed as well and the object itself is removed from its parent. That is, aggregations won't contain destroyed objects or null/undefined.

For example, UI5's turntable control Carousel: once the turntable is destructed, the page displayed in it certainly has no meaning to continue to exist and needs to be destructed.

Association describes a soft dependency relationship at the lifecycle level:

Managed associations also form a relationship between objects, but they don't define a lifecycle for the associated objects. They even can 'break' in the sense that an associated object might have been destroyed already although it is still referenced in an association.

The most obvious example is the relationship between controls and their label, such as button and label: technically, they can exist independently of each other.

CRM

There are three types of relation in CRM's Genil model, which can be viewed in doman CRM_RELATION_KIND:

Difference:

Association: Link between any kind of objects. Can also be defined across components with root or access object as target. A type of relation with the most loose dependency, which can be used to connect nodes across model.

Aggregation: Binds child objects to a root object. Only access and dependent objects can be aggregated. Applies only to associations between nodes of the same model.

Composition: Like an aggregation, but composed child objects always exist. Special type of Aggregation. The Cardinality of the target node is 1 or 1.. n

S/4HANA

There are only two: association or composition. The meaning of Composition is the same as that of aggregation in CRM, while the meaning of association is the same as that of association in UI5 and CRM.

C4C

There are only two: association or composition. These two relation types of C4C have an additional limitation: the target BO of the relation must be in the same deployment unit Deployment Unit as the source BO, or the target BO must be located in the Foundation deployment unit.

The syntax of Association is as follows:

Association's multiplicity only supports [0JEI 1] or [1JI]. If it is not explicitly specified, it defaults to [1J 1].

A feature of C4C relation is that once a child node is declared, the system will generate a corresponding composition by default.

Line 4 of the following figure automatically generates a composition from the root node to the Item node.

At this point, the study on "what is the use of Association and Aggregation methods by UI5" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report