import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Timer;
import com.vaadin.terminal.gwt.client.ui.VUnknownComponent;
+import com.vaadin.terminal.gwt.client.ui.VUnknownComponentPaintable;
public class ApplicationConfiguration implements EntryPoint {
return useDebugIdInDom;
}
- public Class<? extends VPaintableWidget> getWidgetClassByEncodedTag(String tag) {
+ public Class<? extends VPaintableWidget> getWidgetClassByEncodedTag(
+ String tag) {
try {
int parseInt = Integer.parseInt(tag);
return classes[parseInt];
} catch (Exception e) {
// component was not present in mappings
- return VUnknownComponent.class;
+ return VUnknownComponentPaintable.class;
}
}
import com.vaadin.terminal.gwt.client.ui.VListSelectPaintable;
import com.vaadin.terminal.gwt.client.ui.VSplitPanelHorizontal;
import com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical;
-import com.vaadin.terminal.gwt.client.ui.VUnknownComponent;
+import com.vaadin.terminal.gwt.client.ui.VUnknownComponentPaintable;
import com.vaadin.terminal.gwt.client.ui.VView;
import com.vaadin.terminal.gwt.client.ui.VWindow;
final Class<? extends VPaintableWidget> classType = resolveWidgetType(
uidl, conf);
- if (classType == null || classType == VUnknownComponent.class) {
+ if (classType == null || classType == VUnknownComponentPaintable.class) {
String serverSideName = conf
.getUnknownServerClassNameByEncodedTagName(uidl.getTag());
- VUnknownComponent c = GWT.create(VUnknownComponent.class);
+ VUnknownComponentPaintable c = GWT
+ .create(VUnknownComponentPaintable.class);
c.setServerSideClassName(serverSideName);
return c;
} else if (VWindow.class == classType) {
public Class<? extends VPaintableWidget> getImplementationByClassName(
String fullyqualifiedName) {
if (fullyqualifiedName == null) {
- return VUnknownComponent.class;
+ return VUnknownComponentPaintable.class;
}
Class<? extends VPaintableWidget> implementationByServerSideClassName = widgetMap
.getImplementationByServerSideClassName(fullyqualifiedName);
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.VPaintableWidget;
import com.vaadin.terminal.gwt.client.SimpleTree;
-import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.VUIDLBrowser;
-public class VUnknownComponent extends Composite implements VPaintableWidget {
+public class VUnknownComponent extends Composite {
com.google.gwt.user.client.ui.Label caption = new com.google.gwt.user.client.ui.Label();;
SimpleTree uidlTree;
- private VerticalPanel panel;
- private String serverClassName = "unkwnown";
+ protected VerticalPanel panel;
+ protected String serverClassName = "unkwnown";
public VUnknownComponent() {
panel = new VerticalPanel();
this.serverClassName = serverClassName;
}
- public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
- if (client.updateComponent(this, uidl, false)) {
- return;
- }
- setCaption("Widgetset does not contain implementation for "
- + serverClassName
- + ". Check its @ClientWidget mapping, widgetsets "
- + "GWT module description file and re-compile your"
- + " widgetset. In case you have downloaded a vaadin"
- + " add-on package, you might want to refer to "
- + "<a href='http://vaadin.com/using-addons'>add-on "
- + "instructions</a>. Unrendered UIDL:");
- if (uidlTree != null) {
- uidlTree.removeFromParent();
- }
-
- uidlTree = new VUIDLBrowser(uidl, client.getConfiguration());
- uidlTree.open(true);
- uidlTree.setText("Unrendered UIDL");
- panel.add(uidlTree);
- }
-
public void setCaption(String c) {
caption.getElement().setInnerHTML(c);
}
-
- public Widget getWidgetForPaintable() {
- return this;
- }
}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal.gwt.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.terminal.gwt.client.ApplicationConnection;
+import com.vaadin.terminal.gwt.client.UIDL;
+import com.vaadin.terminal.gwt.client.VUIDLBrowser;
+
+public class VUnknownComponentPaintable extends VAbstractPaintableWidget {
+
+ public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
+ if (client.updateComponent(this, uidl, false)) {
+ return;
+ }
+ getWidgetForPaintable().setCaption(
+ "Widgetset does not contain implementation for "
+ + getWidgetForPaintable().serverClassName
+ + ". Check its @ClientWidget mapping, widgetsets "
+ + "GWT module description file and re-compile your"
+ + " widgetset. In case you have downloaded a vaadin"
+ + " add-on package, you might want to refer to "
+ + "<a href='http://vaadin.com/using-addons'>add-on "
+ + "instructions</a>. Unrendered UIDL:");
+ if (getWidgetForPaintable().uidlTree != null) {
+ getWidgetForPaintable().uidlTree.removeFromParent();
+ }
+
+ getWidgetForPaintable().uidlTree = new VUIDLBrowser(uidl,
+ client.getConfiguration());
+ getWidgetForPaintable().uidlTree.open(true);
+ getWidgetForPaintable().uidlTree.setText("Unrendered UIDL");
+ getWidgetForPaintable().panel.add(getWidgetForPaintable().uidlTree);
+ }
+
+ @Override
+ protected Widget createWidget() {
+ return GWT.create(VUnknownComponent.class);
+ }
+
+ @Override
+ public VUnknownComponent getWidgetForPaintable() {
+ return (VUnknownComponent) super.getWidgetForPaintable();
+ }
+
+ public void setServerSideClassName(String serverClassName) {
+ getWidgetForPaintable().setServerSideClassName(serverClassName);
+ }
+}