]> source.dussan.org Git - vaadin-framework.git/commitdiff
Made TabSheet compatible with older TestBench scripts
authorArtur Signell <artur@vaadin.com>
Wed, 14 Mar 2012 13:04:55 +0000 (15:04 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 14 Mar 2012 14:01:21 +0000 (16:01 +0200)
src/com/vaadin/terminal/gwt/client/ComponentLocator.java

index ae9f077912bf0dbb9a59b7f0cd588a6ed294ec7a..f6aaf3edd394bbe36bf28ff99f6dbb6f6528a5ee 100644 (file)
@@ -14,6 +14,7 @@ import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ui.SubPartAware;
 import com.vaadin.terminal.gwt.client.ui.VGridLayout;
 import com.vaadin.terminal.gwt.client.ui.VMeasuringOrderedLayout;
+import com.vaadin.terminal.gwt.client.ui.VTabsheetPanel;
 import com.vaadin.terminal.gwt.client.ui.VView;
 import com.vaadin.terminal.gwt.client.ui.VWindow;
 
@@ -465,6 +466,12 @@ public class ComponentLocator {
                     continue;
                 }
 
+                if (w instanceof VTabsheetPanel && !"0".equals(indexString)) {
+                    // TabSheetPanel now only contains 1 connector => the index
+                    // is always 0 which indicates the widget in the active tab
+                    indexString = "0";
+                }
+
                 /*
                  * The new grid and ordered layotus do not contain
                  * ChildComponentContainer widgets. This is instead simulated by