GWT: 1.5.2

Hi,

I am having a problem displaying images after they have been uploaded
to through my web application.  My file upload screen has the file
upload component, with a scaling mechanism sitting behind it, which
all works perfectly.  Once a file has been upload the upload service
returns the URL of the created image back to the client, which I then
use on the client side to add a new image object to my preview panel
on the same page, however the image does not display.

Ultimately, I get a string and build the following code to display the
image on the preview panel
using
//imagefolder =images, which is the name of my base folder in build/
classes/com/mydev/web/ui/public
//URL = returned URL from file upload for example
2/2008/11/30/1230664382652
//ImageSizes.SMALL = small
//ImageSizes.IMAGETYPE = JPG
//full URL equals images/2/2008/11/30/1230664382652small.JPG

Image newImage = new Image(imageFolder+"/"+URL+ ImageSizes.SMALL
+"."+ImageSizes.IMAGETYPE);

However once this displays on the screen the image does not appear but
the empty box instead.  What bothers me is that if I add the following
code to my preview panel the image displays on a recompile:

Image newImage = new Image("images/
2/2008/11/30/1230664382652small.JPG");

Ok so I am not left with logically trying to understand what is the
difference/problem here and I been thinking along the lines of:
1.  Input Streams from upload not closed when create image object
first, however since I can open the image and see all details
correctly in the folder structure I do not think this is the issue.
2.  There may be a need to do a refresh on the panel, which I am
currently trying to investigate.

I have been investigating and debugging this for about 3 days now and
have had no luck searching forums.  I am hoping somebody here with a
deeper understanding of how browsers/GWT handles image retrieval can
point me in the right directions.  Any help with this would be much
appreciated.

Thanks,

Noel

--~--~---------~--~----~------------~-------~--~----~
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