[errai-dev] @DefaultBundle annotation

Heiko Braun hbraun at redhat.com
Fri Jan 29 09:44:04 EST 2010


I've added some deferred binding magic to load resources 
from a GWT ClientBundle. If you look at theStore demo, you see what I mean:

1) TheStore bundle:

public interface StoreIconBundle extends ClientBundle
{
  @ClientBundle.Source("user_gray.png")
  ImageResource userGrayIcon();

 ....
}


2) default bundle declaration:


@DefaultBundle(StoreIconBundle.class)
public class TheStore implements EntryPoint {
...
}

3) Usage in @LoadTool icon declaration:

@LoadTool(name = "Users", icon = "userGrayIcon", group = "Administration")
public class UserManagement implements WSComponent {
 ...
}


For now it's only being used to load tool icons. But it will be extended to support 
other resources as well (i.e. i18n) in the near future.


/Heiko







More information about the errai-dev mailing list