5.1. Client bundle basics using DataResources

The ClientBundle is an interface that defines methods to access any resources that you choose to load it with. For this example you’ll be loading a ClientBundle with DataResources, but the interface could easily define methods for any combination of resources that you’d like.

You use the resource type DataResource to bundle arbitrary file types. For instance, a DataResource could be an icon, or a PDF, or a Zip archive. As such, there’s no good way to extend GWT to optimize its inclusion in a ClientBundle, so it sticks to some basic noninvasive embedding or caching techniques that don’t require knowledge of the specific file type.

5.1.1. DataResource

Most any static data that you’d like to access ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.