]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1986 (tabindex missing from client side)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 15 Aug 2008 13:49:53 +0000 (13:49 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 15 Aug 2008 13:49:53 +0000 (13:49 +0000)
svn changeset:5196/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java
src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
src/com/itmill/toolkit/terminal/gwt/client/ui/ITextualDate.java
src/com/itmill/toolkit/tests/tickets/Ticket1986.java

index 3516b0a5f79424d917e4c897d390413457b30f0f..212bbbf875fc112ad32d44834e3feca501dd597d 100755 (executable)
@@ -757,7 +757,11 @@ public class ApplicationConnection {
 
         boolean enabled = !uidl.getBooleanAttribute("disabled");
         if (component instanceof FocusWidget) {
-            ((FocusWidget) component).setEnabled(enabled);
+            FocusWidget fw = (FocusWidget) component;
+            fw.setEnabled(enabled);
+            if (uidl.hasAttribute("tabindex")) {
+                fw.setTabIndex(uidl.getIntAttribute("tabindex"));
+            }
         }
 
         StringBuffer styleBuf = new StringBuffer();
index 57c11c3f679d52da53e9cfaefb5de607ffa51dfb..d096c7e42ad8f075e720c8505b364a964853a556 100644 (file)
@@ -549,6 +549,11 @@ public class IFilterSelect extends Composite implements Paintable, Field,
             return;
         }
 
+        // not a FocusWidget -> needs own tabindex handling
+        if (uidl.hasAttribute("tabindex")) {
+            tb.setTabIndex(uidl.getIntAttribute("tabindex"));
+        }
+
         immediate = uidl.hasAttribute("immediate");
 
         nullSelectionAllowed = uidl.hasAttribute("nullselect");
index a08dcba1beeff010f05c20fe6fae0faa844e44b9..688e0c960d1686b691f40f513a686a437761eaa6 100644 (file)
@@ -56,6 +56,10 @@ public class ITextualDate extends IDateField implements Paintable, Field,
             formatStr = null;\r
         }\r
         buildDate();\r
+        // not a FocusWidget -> needs own tabindex handling\r
+        if (uidl.hasAttribute("tabindex")) {\r
+            text.setTabIndex(uidl.getIntAttribute("tabindex"));\r
+        }\r
     }\r
 \r
     protected String getFormatString() {\r
index 3f5461bdf37df043ce4f7b548175b1e054aa4486..1f0bc6cad2649ea753ca88b66aec289bd3b53726 100644 (file)
@@ -1,6 +1,8 @@
 package com.itmill.toolkit.tests.tickets;\r
 \r
 import com.itmill.toolkit.Application;\r
+import com.itmill.toolkit.ui.ComboBox;\r
+import com.itmill.toolkit.ui.DateField;\r
 import com.itmill.toolkit.ui.GridLayout;\r
 import com.itmill.toolkit.ui.TextField;\r
 import com.itmill.toolkit.ui.Window;\r
@@ -13,16 +15,17 @@ public class Ticket1986 extends Application {
 \r
         GridLayout layout = new GridLayout(2, 2);\r
         TextField f1 = new TextField("1");\r
-        int index = 0;\r
+        int index = 1;\r
         f1.setTabIndex(index++);\r
         TextField f2 = new TextField("2");\r
         f2.setTabIndex(index++);\r
-        TextField f3 = new TextField("3");\r
+\r
+        DateField f3 = new DateField("3");\r
         f3.setTabIndex(index++);\r
-        TextField f4 = new TextField("4");\r
-        f4.setTabIndex(index++);\r
+        ComboBox cb = new ComboBox("4");\r
+        cb.setTabIndex(index++);\r
 \r
-        layout.addComponent(f4);\r
+        layout.addComponent(cb);\r
         layout.addComponent(f3);\r
         layout.addComponent(f2);\r
         layout.addComponent(f1);\r