What is the usage of the "dependents" aggregation?

c_y picture c_y · Jul 8, 2014 · Viewed 8.6k times · Source

What is the real world usage of the "dependents" aggregation in SAPUI5.

This was added in version 1.9. What problem does it solve? I couldn't find much documentation in the SCN site on this.

Answer

qmacro picture qmacro · Jul 8, 2014

It's to connect otherwise 'orphan' UI elements so they can partake of the databinding available to e.g. a view. It's especially relevant when you instantiate a dialog, e.g. from a fragment, in a view's controller. The dialog won't automatically have the models that are set on the view available to it ... but if you make the dialog a dependent of the view, it will.

See "Using Dialogs Defined As Fragments" for more info.