]> source.dussan.org Git - vaadin-framework.git/commitdiff
moved some of our own component implementations for deferred binding creation
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Oct 2010 14:42:07 +0000 (14:42 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Oct 2010 14:42:07 +0000 (14:42 +0000)
svn changeset:15647/svn branch:6.5

src/com/vaadin/terminal/gwt/client/WidgetSet.java
src/com/vaadin/terminal/gwt/client/ui/VUnknownComponent.java

index e6ed1cb34fd6840c5c47e4f2631995896299fe2f..146e3b894901a73631e68f1e20ce1e3134ce504e 100644 (file)
@@ -61,17 +61,19 @@ public class WidgetSet {
         if (classType == null || classType == VUnknownComponent.class) {
             String serverSideName = conf
                     .getUnknownServerClassNameByEncodedTagName(uidl.getTag());
-            return new VUnknownComponent(serverSideName);
+            VUnknownComponent c = GWT.create(VUnknownComponent.class);
+            c.setServerSideClassName(serverSideName);
+            return c;
         } else if (VSplitPanelVertical.class == classType) {
-            return new VSplitPanelVertical();
+            return GWT.create(VSplitPanelVertical.class);
         } else if (VTextArea.class == classType) {
-            return new VTextArea();
+            return GWT.create(VTextArea.class);
         } else if (VDateFieldCalendar.class == classType) {
-            return new VDateFieldCalendar();
+            return GWT.create(VDateFieldCalendar.class);
         } else if (VPasswordField.class == classType) {
-            return new VPasswordField();
+            return GWT.create(VPasswordField.class);
         } else if (VWindow.class == classType) {
-            return new VWindow();
+            return GWT.create(VWindow.class);
         } else {
             /*
              * let the auto generated code instantiate this type
index 062df4f6ae93eb3fbe0e24feb6393cec16b01491..e03d450243853215db9bf657c5678e91cfe90bdd 100644 (file)
@@ -17,10 +17,9 @@ public class VUnknownComponent extends Composite implements Paintable {
     com.google.gwt.user.client.ui.Label caption = new com.google.gwt.user.client.ui.Label();;
     Tree uidlTree;
     private VerticalPanel panel;
-    private String serverClassName;
+    private String serverClassName = "unkwnown";
 
-    public VUnknownComponent(String serverClassName) {
-        this.serverClassName = serverClassName;
+    public VUnknownComponent() {
         panel = new VerticalPanel();
         panel.add(caption);
         initWidget(panel);
@@ -28,6 +27,10 @@ public class VUnknownComponent extends Composite implements Paintable {
         caption.setStyleName("vaadin-unknown-caption");
     }
 
+    public void setServerSideClassName(String serverClassName) {
+        this.serverClassName = serverClassName;
+    }
+
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
         if (client.updateComponent(this, uidl, false)) {
             return;