Reputation: 133
I have created a custom control in my ui5 application but now in custom control i want to add new aggregation on click of some button(on an event). i.e I want to add a new aggregation dynamically to view in custom control . is it possible ? How?
Upvotes: 0
Views: 1661
Reputation: 943
You can't create new aggregations at runtime. Aggregations have to be defined before creating any instances, since the element's internal and lifecycle methods also use the definitions (e. g. to create bind/unbind functions).
If you have defined your aggregation, you can create bindings at any time by using sap.ui.base.ManagedObject#bindAggregation
.
Upvotes: 2