Questions tagged [clientbundle]

An image bundle is a construct used to improve application performance by reducing the number of round trip HTTP requests to the server to fetch images.

An image bundle is a construct used to improve application performance by reducing the number of round trip HTTP requests to the server to fetch images. GWT can package many image files into a single large file to be downloaded from the server and managed as a Java object.

Resources

Good understanding of ClientBundle advantages : https://developers.google.com/web-toolkit/doc/latest/DevGuideUiImageBundles?hl=fr

Official documentation : https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle

61 questions
23
votes
2 answers

How to ClientBundle in GWT?

I am using GWT ClientBundle for the first time. I wrote interface that extends it and here is the code: package edu.etf.fuzzy.client.login; import com.google.gwt.resources.client.ClientBundle; import…
azec-pdx
  • 4,790
  • 6
  • 56
  • 87
21
votes
4 answers

In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes?

I have a CssResource where I want to have some of the css classes "mapped" to methods: @ClassName("top-table") String topTable(); But I want to turn off the obfuscation GWT does (while developing at least, for better debugging in firebug, etc). Is…
AlfaTeK
  • 7,487
  • 14
  • 49
  • 90
8
votes
1 answer

ClientBundle for multiple "themes"

We have a web application that needs a different theme for each major client. The original developer did this by looking at the URL in javascript and adding a stylesheet to override the default theme. One problem with this is the site has the…
benstpierre
  • 32,833
  • 51
  • 177
  • 288
7
votes
1 answer

How to use dependent style names together with the CssResource obfuscation?

I access the style names through CssResource, either from the UiBinder and from the java views. The problem is I cannot find a way to add and remove suffixes due to the class names obfuscation. By the moment I've managed the situation using…
Andres
  • 1,484
  • 19
  • 29
6
votes
1 answer

How to override default CSS in modern GWT applications?

From the following page: Developer's Guide - CSS Style it is made clear that in modern GWT apps there's two ways to declare css styles: Using a CssResource contained within a ClientBundle. Using an inline element in a UiBinder template. How do you…
Fred
  • 187
  • 5
  • 23
5
votes
1 answer

GWT code-splitting pattern for ClientBundle image resources

In my GWT large project, I have a ClientBundle for my image resources. I defined about 40 GIF files inside it. (size of each file is about 5KB) Then I create a class with a static method to set the proper image to the obj that get as parameters: …
Nav
  • 4,450
  • 10
  • 53
  • 84
4
votes
1 answer

Attaching an ImageResource from an external CSS file using @sprite

I'm trying to use CssResource and ImageResource together in a GWT2.2 project. CssResource and obfuscation are working properly, but I'm having problems accessing images. I already can access the images through ImageResource directly from the ui.xml…
Andres
  • 1,484
  • 19
  • 29
4
votes
2 answers

User svg images in GWT ClientBundle (ImageBundle)

I normally use the GWT ClientBundle for managing my images within my application like this @Source("icons/info.png") ImageResource info(); No I want to switch to .svg graphics but I didn't find a way to use svg in a ClientBundle like SVGResource or…
mxlse
  • 2,654
  • 17
  • 31
3
votes
1 answer

GWT UiBinder and Image Sprites

I'm having trouble getting CSS image sprites to appear in GWT UiBinder. I did review how do i use image sprites in GWT?, but found I was already doing what was suggested. I have a ui.xml, ClientBundle interface with a CssBundle nested interface, and…
Ray
  • 4,829
  • 4
  • 28
  • 55
3
votes
2 answers

Change source CSS at runtime when using GWT and ClientBundle

I have a ClientBundle: public interface Resources extends ClientBundle { @Source("styles/styles.css") Layout styles(); @Source("styles/styles2.css") Styles styles2(); } In my UiBinder xml I use this class like this:
per_jansson
  • 2,103
  • 4
  • 29
  • 46
3
votes
2 answers

automatic GWT ClientBundles based on disk files

I'm currently making good use of GWT's ClientBundles in my app. It works fine, but I have a large number of resources and it becomes tedious to manually create Java interfaces for each file: @ClientBundle.Source("world_war_ii.txt") public…
George Armhold
  • 30,824
  • 50
  • 153
  • 232
3
votes
1 answer

GWT UIBinder Type mismatch: cannot convert from ImageResource to Image

I am new to GWT and trying to follow the documentation to work with UIBinders. I think I have followed everything I have found on the topic from some of the following sources and…
nburn42
  • 697
  • 7
  • 25
3
votes
1 answer

ClientBundles and code splitting in GWT?

I have a ClientBundle, which defines a bunch of TextResource and ImageResource elements. For each page on my site, I plan to set up a code split point, which will run the views / presenters for that given page only. My question is, say I have an…
Ali
  • 261,656
  • 265
  • 575
  • 769
3
votes
2 answers

GWT, CssStyle being injected multiple times

I have been using a ClientBundle and CssResources for quite some time but have noticed that my styles is getting injected many times. The one thing I can point my finger too is that I use quite a few
Chris Hinshaw
  • 6,967
  • 2
  • 39
  • 65
3
votes
3 answers

How does GWT ClientBundle caching work?

I am trying to better understand the use of GWT ClientBundle and caching. If I have a large text file, for example, that I'd like to make available to my client, I can use public interface MyResources extends ClientBundle { public static final…
aez
  • 2,406
  • 2
  • 26
  • 46
1
2 3 4 5