summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-04 15:03:09 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-04 15:03:09 +0300
commit4ddad499f9634c320d092589d57a0f3d55993d39 (patch)
treea31da48f87f116c68f31f38c2487f087b01060cd /client/src
parent53393b62163a78f1f7bd19d7e7b95a8e779da15f (diff)
downloadvaadin-framework-4ddad499f9634c320d092589d57a0f3d55993d39.tar.gz
vaadin-framework-4ddad499f9634c320d092589d57a0f3d55993d39.zip
And yet another ComponentLocator fix
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ComponentLocator.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java
index f22dbc422d..5c52c4ebcc 100644
--- a/client/src/com/vaadin/client/ComponentLocator.java
+++ b/client/src/com/vaadin/client/ComponentLocator.java
@@ -23,11 +23,11 @@ import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ui.SubPartAware;
import com.vaadin.client.ui.UI.VUI;
import com.vaadin.client.ui.gridlayout.VGridLayout;
-import com.vaadin.client.ui.orderedlayout.VBoxLayout;
import com.vaadin.client.ui.orderedlayout.VMeasuringOrderedLayout;
import com.vaadin.client.ui.tabsheet.VTabsheetPanel;
import com.vaadin.client.ui.window.VWindow;
@@ -499,11 +499,6 @@ public class ComponentLocator {
widgetClassName = "VBoxLayout";
}
- if (w instanceof VBoxLayout
- && "ChildComponentContainer".equals(widgetClassName)) {
- widgetClassName = "VBoxLayout$Slot";
- }
-
if (w instanceof VTabsheetPanel && widgetPosition != 0) {
// TabSheetPanel now only contains 1 connector => the index
// is always 0 which indicates the widget in the active tab
@@ -589,6 +584,12 @@ public class ComponentLocator {
Widget child = iterator.next();
String simpleName2 = Util.getSimpleName(child);
+ if ("VBoxLayout$Slot".equals(simpleName2)) {
+ // Replace slot with the actual widget in the slot
+ child = ((SimplePanel) child).getWidget();
+ simpleName2 = Util.getSimpleName(child);
+ }
+
if (widgetClassName.equals(simpleName2)) {
if (widgetPosition == 0) {
w = child;