Wednesday, January 7, 2015

Re: SafeHtmlTemplate display alternative (backgorund- or cell-) image inside (mgwt)CellList-Item if image not available

A bit unfortunate that GWT has a CellList and MGWT has a CellList and both are totally different. Maybe you should ask this on a MGWT mailing list?

But given that MGWT CellList is a Widget you can add any event handler to it using addDomHandler(). I am not sure about the error event but I would try adding a ErrorEvent/ErrorHandler to the CellList. If it really triggers then you should be able to figure out the <img> element and change its src attribute if loading has failed.

And yes you need an <img> element because no event exists that tells you if a CSS background image has been loaded or not.

-- J.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment