]> source.dussan.org Git - vaadin-framework.git/commitdiff
blocks tab changes, while still waiting for a response to another tab chance. Fixes...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 12 May 2008 08:12:34 +0000 (08:12 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 12 May 2008 08:12:34 +0000 (08:12 +0000)
svn changeset:4428/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java

index 51e7f7e36c6b25a15117bc78badb061d5707dddc..5f7ae863491a45d9ae1abe8d78e660cb1812df9e 100644 (file)
@@ -32,6 +32,8 @@ public class ITabsheet extends ITabsheetBase implements
     private String height;
     private String width;
 
+    private boolean waitingForResponse;
+
     /**
      * Previous visible widget is set invisible with CSS (not display: none, but
      * visibility: hidden), to avoid flickering during render process. Normal
@@ -57,11 +59,12 @@ public class ITabsheet extends ITabsheetBase implements
                                 tabIndex).toString(), true);
                     }
                 });
+                waitingForResponse = true;
             }
         }
 
         public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) {
-            if (disabled) {
+            if (disabled || waitingForResponse) {
                 return false;
             }
             final Object tabKey = tabKeys.get(tabIndex);
@@ -136,7 +139,7 @@ public class ITabsheet extends ITabsheetBase implements
             tb.setVisible(true);
             removeStyleName(CLASSNAME + "-hidetabs");
         }
-
+        waitingForResponse = false;
     }
 
     protected void renderTab(final UIDL tabUidl, int index, boolean selected) {