Вопрос

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.

Это было полезно?

Решение

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

image.attachBrowserEvent('load', function(){
    alert("Image loaded");
});
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top