From 735405243226107b4a8463a962c8f76976a7468b Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 25 Mar 2013 14:16:59 +0200 Subject: Fixed ComponentLocator to be backwards compatible The WAI-ARIA fix (#11180) introduced a new FlowPanel in a PopupDateField popup which is now handled properly. Change-Id: I192018c95d6d1502e3a50e5c30d4125d467ddf94 --- client/src/com/vaadin/client/ComponentLocator.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 05603e8abe..543877448a 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -28,6 +28,7 @@ import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ui.SubPartAware; import com.vaadin.client.ui.VCssLayout; import com.vaadin.client.ui.VGridLayout; +import com.vaadin.client.ui.VOverlay; import com.vaadin.client.ui.VTabsheetPanel; import com.vaadin.client.ui.VUI; import com.vaadin.client.ui.VWindow; @@ -565,7 +566,8 @@ public class ComponentLocator { // ChildComponentContainer and VOrderedLayout$Slot have been // replaced with Slot if (w instanceof VAbstractOrderedLayout - && ("ChildComponentContainer".equals(widgetClassName) || "VOrderedLayout$Slot" + && ("ChildComponentContainer" + .equals(widgetClassName) || "VOrderedLayout$Slot" .equals(widgetClassName))) { widgetClassName = "Slot"; } @@ -575,7 +577,12 @@ public class ComponentLocator { // is always 0 which indicates the widget in the active tab widgetPosition = 0; } - + if (w instanceof VOverlay + && "VCalendarPanel".equals(widgetClassName)) { + // Vaadin 7.1 adds a wrapper for datefield popups + parent = (Iterable) ((Iterable) parent).iterator() + .next(); + } /* * The new grid and ordered layotus do not contain * ChildComponentContainer widgets. This is instead simulated by @@ -585,7 +592,8 @@ public class ComponentLocator { * ChildComponentContainer) */ if ((w instanceof VGridLayout) - && "ChildComponentContainer".equals(widgetClassName) + && "ChildComponentContainer" + .equals(widgetClassName) && i + 1 < parts.length) { HasWidgets layout = (HasWidgets) w; -- cgit v1.2.3