Vra

I'm wondering how to attach onload event for SAPUI5 image

var image = new sap.ui.commons.Image({id: "cImage"})

I know that there is a way using native js or jquery onload event to do it, but my question is how can I do this using SAPUI5 events like attachPress for clicking for example.

Was dit nuttig?

Oplossing

After searching I found a method for ui5 controls called 'attachBrowserEvent' which can handle any browser event:

image.attachBrowserEvent('load', function(){
    alert("Image loaded");
});
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top