I have an image from a ClientBundle resource:
final String myImageUrl = new 
Image(Resources.sSingleton.GetMyImage()).getUrl();

I also have a SafeHtmlTemplates interface:
public interface MyTemplates extends SafeHtmlTemplates {
@Template("<img src='{1}'/>")
SafeHtml GenerateCellHtml(String imageUrl);
}

When I call MyTemplates.GenerateCellHtml an exception is thrown because the 
URL output by Image.getUrl(), when the image comes from a resource, does not 
have one of the supported protocols (http, https, ftp, etc.).

Is it possible to use SafeHtmlTemplates with an Image sourced from a 
ClientBundle?  Am I stuck manually building the HTML string in the middle of 
my Java code using SafeHTMLBuilder?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/XZnb_u4238EJ.
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