]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #7534
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Fri, 2 Sep 2011 13:25:51 +0000 (13:25 +0000)
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Fri, 2 Sep 2011 13:25:51 +0000 (13:25 +0000)
svn changeset:20827/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java
src/com/vaadin/ui/TreeTable.java

index ecc065e117ca190e8f3f91363cf8a6379cee8e43..8730b580ddfa991e763b89ccdf9b13685931dff2 100644 (file)
@@ -84,10 +84,8 @@ public class VTreeTable extends VScrollTable {
             collapseRequest = false;
         }
         if (uidl.hasAttribute("focusedRow")) {
-            // TODO figure out if the row needs to focused at all
-
-            // scrolled to parent by the server, focusedRow is probably the sam
-            // as the first row in view port
+            String key = uidl.getStringAttribute("focusedRow");
+            setRowFocus(getRenderedRowByKey(key));
         }
     }
 
index 6832e68d3b3ae455be696eb49ad7d5eed1353ed2..7971d292bc9ffa3e70d116c877604818de914a34 100644 (file)
@@ -390,16 +390,15 @@ public class TreeTable extends Table implements Hierarchical {
         if (!inView) {
             setCurrentPageFirstItemId(itemId);
         }
+        // Select the row if it is selectable.
         if (isSelectable()) {
             if (isMultiSelect()) {
                 setValue(Collections.singleton(itemId));
             } else {
                 setValue(itemId);
             }
-        } else {
-            // just instruct the VTreeTable to set focus the row (not to select)
-            setFocusedRow(itemId);
         }
+        setFocusedRow(itemId);
     }
 
     private void setFocusedRow(Object itemId) {