I don't think that's a bug at all.  The image is not loaded until it
is in the DOM, and that does not happen when the servlet is called,
but after the image is returned.

My application a lot with resizing and otherwise manipulating images.
I pass the available display dimensions to my image servlet, and use
JAI and JAI-IMAGEIO to open the image, determine its size, scale it to
fit the display area, and return the scaled and/or cropped/rotated
image as a PNG to the browser.

On Apr 19, 7:48 am, Simon Botting <[email protected]>
wrote:
> Hi,
>
> I've got a question about the Image onLoad mechanism in GWT 2.0.3 - I
> was setting the url of the Image with setUrl(String) call and no
> LoadEvent was being fired, which confused me as, according to the
> javadoc the setUrl method...
>
> "Sets the URL of the image to be displayed. If the image is in the
> clipped state, a call to this method will cause a transition of the
> image to the unclipped state. Regardless of whether or not the image
> is in the clipped or unclipped state, a load event will be fired."
>
> After a while I worked out that because the Image wasn't actually
> displayed on the screen (I wanted to load it first to work out its
> dimensions and then display it),  the call to setUrl - although it did
> retrieve the image from the server (according to the net panel in
> firebug) -  didn't fire the LoadEvent.
>
> My question is this, is this a bug in GWT or should the documentation
> be a bit more explicit about when the LoadEvent is fired?  Or... am I
> just being unreasonably fastidious.
>
> Cheers
> Simon
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to