Take the 2-minute tour ×

When I have a Vaadin application does it download all the gui widgets to the client or does it download them on demand. I ask because I have some clients that only use some widgets but not others.

share|improve this question
add comment

2 Answers

The default loading method is eager (EagerWidgetMapGenerator). You have a few choices for loading the widgets. Here are some of them:


You can choose to use the LazyWidgetMapGenerator by adding this to your widgetset (.gwt.xml):

<generate-with class="com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator">
    <when-type-is class="com.vaadin.terminal.gwt.client.WidgetMap" />

This will load the widgets only when requested.


Same as above, but replace LazyWidgetMapGenerator with WidgetMapGenerator. This will use the widgets' loading preference and I believe most of them are DEFERRED.

Custom #1

Create a custom widget map generator by subclassing CustomWidgetMapGenerator and defining it in your widgetset (same as above but replace LazyWidgetMapGenerator with your class).

Custom #2

Create a custom widget map generator by subclassing WidgetMapGenerator (mostly deferred, defined by widgets) or EagerWidgetMapGenerator (every widget loaded EAGERly), setting only some of the widgets LAZY (or DEFERRED, or EAGER) and defining it in your widgetset.

For more info, check the API doc and this out: http://dev.vaadin.com/wiki/WidgetSet

share|improve this answer
add comment

You can choose which widgets are loaded on start and which on demand. Default is to load them all on start.

share|improve this answer
How can you choose? I checked the documentation but I can't find it anywhere –  Zubair Apr 26 '11 at 12:04
add comment

Your Answer


