Here's some sample code showing how to use an image in UiBinder:

Place your Icon Images in a pkg folder; say "
pkg/path/containing/icon/resources"
Create a ClientBundle for these images

public interface PopupIcons extends ClientBundle {

@Source("pkg/path/containing/icon/resources/loading.gif")

ImageResource symbolsLoadingIcon();

}


Use the ClientBundle in UiBinder

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" 
xmlns:g="urn:import:com.google.gwt.user.client.ui"> 

<ui:with type="pkg.path.containing.icon.PopupIcons" field="res"></ui:with> 

.... 

<g:Image ui:field="icon" styleName="{style.icon}" 
resource="{res.symbolsLoadingIcon}"></g:Image>



Regards,
Nirmal

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