Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Add control listener?

Hi guys,

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.


Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question