You can use the following code to build the html for the image: AbstractImagePrototype.create(Resources.Singleton.GetMyImage()).getHTML();
Regards, Ioan On Aug 13, 12:25 am, Micah Caldwell <[email protected]> wrote: > 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 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.
