Add control listener?
I want to call a certain function everytime a control gets created. I can think of 3 ways to do so:
- Extend sap.ui.core.Control (super time-consuming in my opinion)
- Extend a general sap.ui.core function (f.e. attachControlEvent) but I can't get this to work properly
- Extend every layout I use (MatrixLayoutCells, HorizontalLayout etc) by extending their addContent method (seems dirty)
None of these options are suitable as of yet.
Did someone do some research on that topic and could share his results?
Or maybe other ideas/functionality SAPUI5 has to offer.