aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/ClientWidget.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-06-11 14:40:49 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-06-11 14:40:49 +0000
commitd3482aab86dfdb76ab33260b82e4821094e1b5fa (patch)
treea96d883cd6d182ef29167b5294218014c86cbfe9 /src/com/vaadin/ui/ClientWidget.java
parentac06d92f7e6ec40fc9cbdf5c2fe867079cfc343c (diff)
downloadvaadin-framework-d3482aab86dfdb76ab33260b82e4821094e1b5fa.tar.gz
vaadin-framework-d3482aab86dfdb76ab33260b82e4821094e1b5fa.zip
code splitting + client initialization
svn changeset:13651/svn branch:6.4
Diffstat (limited to 'src/com/vaadin/ui/ClientWidget.java')
-rw-r--r--src/com/vaadin/ui/ClientWidget.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/com/vaadin/ui/ClientWidget.java b/src/com/vaadin/ui/ClientWidget.java
index 39aecf1f86..0848309b31 100644
--- a/src/com/vaadin/ui/ClientWidget.java
+++ b/src/com/vaadin/ui/ClientWidget.java
@@ -26,7 +26,6 @@ import com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator;
* Note, even though client side implementation is needed during development,
* one may safely remove them from classpath of the production server.
*
- *
* @since 6.2
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -38,6 +37,8 @@ public @interface ClientWidget {
Class<? extends Paintable> value();
/**
+ * TODO rewrite for EAGER, DEFERRED, LAZY
+ *
* The lazy loading of a widget implementation means the client side
* component is not included in the initial JavaScript application loaded
* when the application starts. Instead the implementation is loaded to the
@@ -64,6 +65,23 @@ public @interface ClientWidget {
* screen slightly increases, but widgets implementation does not
* stress the initialization of the client side engine.
*/
- boolean lazyLoad() default true;
+ LoadStyle loadStyle() default LoadStyle.DEFERRED;
+
+ public enum LoadStyle {
+ /**
+ * The widget is included in the initial JS sent to the client.
+ */
+ EAGER,
+ /**
+ * Not included in the initial set of widgets, but added to queue from
+ * which it will be loaded when network is not busy or the
+ * implementation is required.
+ */
+ DEFERRED,
+ /**
+ * Loaded to the client only if needed.
+ */
+ LAZY
+ }
}