Although you could certainly return the bytes of an image via RPC,  
once you have them on the client side, there is no way to actually  
turn those bytes into an image (or even save those bytes to the file  
system). That is a limitation of the XMLHTTP request and javascript,  
not a limitation made by GWT.

You could either return a URL from your RPC and then create an  
imageWidget using that URL, or you could simply skip the RPC  
altogether and create a GET request URL that presumably ends at a  
servlet capable of returning your image. And use that directly in the  
ImageWidget, something like new Image(GWT.getModuleBaseURL()+"images/ 
ImageServlet?param=foo");

-jason

On Oct 21, 2008, at 1:31 PM, Alley wrote:

>
> Hi, I need to create an rpc to return an image.
>
> Thanks,
> Alley
> >


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