com.vaadin.terminal.gwt.widgetsetutils
Class LazyWidgetMapGenerator

java.lang.Object
  extended by com.google.gwt.core.ext.Generator
      extended by com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator
          extended by com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator

public class LazyWidgetMapGenerator
extends WidgetMapGenerator

WidgetMap generator that builds a widgetset that optimizes the transferred data. Widgets are loaded only when used if the widgetset is built with this generator.

See Also:
WidgetMapGenerator

Constructor Summary
LazyWidgetMapGenerator()
           
 
Method Summary
protected  Connect.LoadStyle getLoadStyle(Class<? extends ServerConnector> connector)
          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
 
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

LazyWidgetMapGenerator

public LazyWidgetMapGenerator()
Method Detail

getLoadStyle

protected Connect.LoadStyle getLoadStyle(Class<? extends ServerConnector> connector)
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 Connect 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.

Overrides:
getLoadStyle in class WidgetMapGenerator
Returns:
true iff the widget for given component should be lazy loaded by the client side engine


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.