summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-03 12:56:53 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-03 12:56:53 +0300
commit5833ae25ec617e2ea93eeef669b2fd247d8f394c (patch)
tree6f28f02719b211f198f2aec534c5a350b6f98db6
parent971b0684482dd3b7eb4efac09b9c24e1ea2b305d (diff)
downloadvaadin-framework-5833ae25ec617e2ea93eeef669b2fd247d8f394c.tar.gz
vaadin-framework-5833ae25ec617e2ea93eeef669b2fd247d8f394c.zip
Fixed component locator for box layouts
-rw-r--r--client/src/com/vaadin/client/ComponentLocator.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java
index dabea6c8d7..c286b2fb9d 100644
--- a/client/src/com/vaadin/client/ComponentLocator.java
+++ b/client/src/com/vaadin/client/ComponentLocator.java
@@ -23,6 +23,7 @@ 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;
@@ -516,7 +517,8 @@ public class ComponentLocator {
* (which would originally have found the widget inside the
* ChildComponentContainer)
*/
- if ((w instanceof VMeasuringOrderedLayout || w instanceof VGridLayout)
+ if ((w instanceof VMeasuringOrderedLayout
+ || w instanceof VBoxLayout || w instanceof VGridLayout)
&& "ChildComponentContainer".equals(widgetClassName)
&& i + 1 < parts.length) {
@@ -585,8 +587,14 @@ public class ComponentLocator {
while (iterator.hasNext()) {
Widget child = iterator.next();
+
String simpleName2 = Util.getSimpleName(child);
+ if (simpleName2.equals("VBoxLayout$Slot")) {
+ child = ((SimplePanel) child).getWidget();
+ simpleName2 = Util.getSimpleName(child);
+ }
+
if (widgetClassName.equals(simpleName2)) {
if (widgetPosition == 0) {
w = child;