resourcebundle in gwt and gxt

GWT will search for the same package for resource.

just put the image/css or other resource in the resource folder with the same package route.

public interface Resources extends ClientBundle{
ImageResource add();

For gxt2, widgets like Button accepts “AbstractImagePrototype”, so we use ClientBundles with ImageResources, we can convert by  using:




For CSS, without UIBinder, remember to call the Resources.INSTANCE.xxxx().ensureInjected();

If you use UiBinder the call to ensureInjected is provided by the tag ui:with. For any other css you are using in a client bundle (i.e. legacy css excluded) and that are not declared in a ui:with block, you have to call ensureInjected explicitly.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s