Friday, December 28, 2012

Re: How to rewrite ClientBundle images to static uibinder images?

On Thursday, December 27, 2012 2:52:46 PM UTC+1, membersound wrote:
I know how to use images in general with uibinder, like:

<g:Image resource='{res.image}' />

public interface Resources extends ClientBundle {
    @ImageOptions(repeatStyle = RepeatStyle.None)
    ImageResource image();

But in case of static images, how can I use the same image in the same way, but without having to write any java code? Just using uibinder?

Each UiBinder template defines an implicit ClientBundle. You can declare a CssResource using <ui:style>, a DataResource with <ui:data> and an ImageResource with <ui:image>:

<ui:image field="image" src="image.png" repeatStyle="None"/> (there's also a flipRtl="true" attribute; and just like the @Source is optional, src="" is optional too)

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment