Skip to Content
0

Creating global event for sap.ui.core.Element or sap.ui.core.Control classes in SAPUI5

Mar 06, 2017 at 10:23 AM

44

avatar image

I would like to create a event, that would be borrowed by every Element and/or Control that is extending these core classes. Normally I would extend a control (the child to sap.ui.core.Element or sap.ui.core.Control) and add the event to its metadata, but since this is gonna be applied to various controls across the app, I would have to create a lot of custom controls, which is not the case. Is there a simple way to add an event to a class (and therefore its children)? I could achieve the same effect if there would only be something like a "onBeforeRender" event (which existence I'm not aware of) for every Control. I'm using XML views. Is adding custom events to the sap.ui.core.Element or sap.ui.core.Control overally a good thing?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers