com.vaadin.terminal.gwt.widgetsetutils.
Class EagerWidgetMapGenerator
java.lang.Object
com.google.gwt.core.ext.Generator
com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator
com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator
- extends WidgetMapGenerator
public class EagerWidgetMapGenerator
WidgetMap generator that builds a widgetset that packs all included widgets into a single JavaScript file loaded at application initialization. Initially loaded data will be relatively large, but minimal amount of server requests will be done.
This is the default generator in version 6.4 and produces similar type of
widgetset as in previous versions of Vaadin. To activate "code splitting",
use the WidgetMapGenerator
instead, that loads most components
deferred.
See Also:
Constructor Summary | |
---|---|
EagerWidgetMapGenerator()
|
Method Summary | |
---|---|
protected ClientWidget.LoadStyle |
getLoadStyle(Class<? extends Paintable> paintableType)
Returns true if the widget for given component will be lazy loaded by the client. |
Methods inherited from class com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator |
---|
generate, getUsedPaintables |
Methods inherited from class com.google.gwt.core.ext.Generator |
---|
escape |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
EagerWidgetMapGenerator
public EagerWidgetMapGenerator()
Method Detail |
---|
getLoadStyle
protected ClientWidget.LoadStyle getLoadStyle(Class<? extends Paintable> paintableType)
- Overrides:
getLoadStyle
in classWidgetMapGenerator
- Returns:
- true iff the widget for given component should be lazy loaded by the client side engine
Description copied from class: WidgetMapGenerator
Returns true if the widget for given component will be lazy loaded by the
client. The default implementation reads the information from the
ClientWidget
annotation.
The method can be overridden to optimize the widget loading mechanism. If the Widgetset is wanted to be optimized for a network with a high latency or for a one with a very fast throughput, it may be good to return false for every component.