From 9b22c384df2df529b9961a4836747b761b5353fc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 12 Apr 2012 18:04:07 +0300 Subject: [PATCH] UnknownComponent should now work again (#8651) --- .../client/ui/UnknownComponentConnector.java | 42 +++++-------------- .../gwt/client/ui/VUnknownComponent.java | 5 --- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java index f570990398..94eff44eee 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java @@ -6,43 +6,14 @@ 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.Paintable; -import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.VUIDLBrowser; -public class UnknownComponentConnector extends AbstractComponentConnector - implements Paintable { +public class UnknownComponentConnector extends AbstractComponentConnector { @Override public boolean delegateCaptionHandling() { return false; } - public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { - if (!isRealUpdate(uidl)) { - return; - } - getWidget() - .setCaption( - "Widgetset does not contain implementation for " - + getWidget().serverClassName - + ". Check its component connector's @Connect 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 " - + "add-on " - + "instructions. Unrendered UIDL:"); - if (getWidget().uidlTree != null) { - getWidget().uidlTree.removeFromParent(); - } - - getWidget().uidlTree = new VUIDLBrowser(uidl, client.getConfiguration()); - getWidget().uidlTree.open(true); - getWidget().uidlTree.setText("Unrendered UIDL"); - getWidget().panel.add(getWidget().uidlTree); - } - @Override protected Widget createWidget() { return GWT.create(VUnknownComponent.class); @@ -54,6 +25,15 @@ public class UnknownComponentConnector extends AbstractComponentConnector } public void setServerSideClassName(String serverClassName) { - getWidget().setServerSideClassName(serverClassName); + getWidget() + .setCaption( + "Widgetset does not contain implementation for " + + serverClassName + + ". Check its component connector's @Connect 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 " + + "add-on " + + "instructions."); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUnknownComponent.java b/src/com/vaadin/terminal/gwt/client/ui/VUnknownComponent.java index ad702430f6..7bcdcec660 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VUnknownComponent.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VUnknownComponent.java @@ -13,7 +13,6 @@ public class VUnknownComponent extends Composite { com.google.gwt.user.client.ui.Label caption = new com.google.gwt.user.client.ui.Label();; SimpleTree uidlTree; protected VerticalPanel panel; - protected String serverClassName = "unkwnown"; public VUnknownComponent() { panel = new VerticalPanel(); @@ -23,10 +22,6 @@ public class VUnknownComponent extends Composite { caption.setStyleName("vaadin-unknown-caption"); } - public void setServerSideClassName(String serverClassName) { - this.serverClassName = serverClassName; - } - public void setCaption(String c) { caption.getElement().setInnerHTML(c); } -- 2.39.5