cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between aggregation and association in ui5?

Former Member
0 Kudos

Hello experts,

Can anyone of folks tell the difference between aggregation and association in ui5 with details ?

Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor

Hi,

as per UI5 documentation,


An aggregation is a special relation between two UI element types. It is used to define the parent/child relationship within the above mentioned tree structure. The parent end of the aggregation has cardinality 0..1, while the child end may have 0..1 or 0..*. The element's API - as generated by UI5 tools - offers convenient and consistent methods to deal with aggregations (e.g. to get, set, or remove target elements). Examples are table rows and cells, or the content of a table cell.

An association is another type of relation between two UI element types which is independent of the parent/child relationship within the above mentioned tree structure. Directed outgoing associations to a target of cardinality 0..1 are supported. They represent a loose coupling only and are thus implemented by storing the target element instance's ID. The most prominent example is the association between a label and its field.

tables rows and cells is the example of aggregation whereas label associated with input field is the example of association.

Hope this helps.

Regards,

Chandra

Former Member
0 Kudos

Hello Chandra,

          thanks.

Former Member
0 Kudos

Hello,

       can you tell me difference between addRow() and createRow() in matrixLayout?When to use each one of them?

Regards,

Ripu

Former Member
0 Kudos

and +1

how to set textcolor of textView except using addStyleClass() api?

ChandraMahajan
Active Contributor
0 Kudos

Hi,

If your original question got answered then you can close it. for further questions, please create new discussion thread.

Regards,

Chandra

Answers (0)