]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7224 Table context menu does not work before refreshing table contents
authorArtur Signell <artur.signell@itmill.com>
Mon, 25 Jul 2011 13:56:07 +0000 (13:56 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 25 Jul 2011 13:56:07 +0000 (13:56 +0000)
svn changeset:19924/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
src/com/vaadin/ui/Table.java

index 63e6cc8415bf8e6f7caac3008580ce2511d1144c..ba076eb0ed1451ef5ca705375b1881fb786c8689 100644 (file)
@@ -841,6 +841,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
 
         boolean keyboardSelectionOverRowFetchInProgress = selectSelectedRows(uidl);
 
+        updateActionMap(uidl);
+
         updateColumnProperties(uidl);
 
         UIDL ac = uidl.getChildByTagName("-ac");
@@ -1221,8 +1223,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
         lazyUnregistryBag.clear();
     }
 
-    private void updateActionMap(UIDL c) {
-        final Iterator<?> it = c.getChildIterator();
+    private void updateActionMap(UIDL mainUidl) {
+        UIDL actionsUidl = mainUidl.getChildByTagName("actions");
+        if (actionsUidl == null) {
+            return;
+        }
+
+        final Iterator<?> it = actionsUidl.getChildIterator();
         while (it.hasNext()) {
             final UIDL action = (UIDL) it.next();
             final String key = action.getStringAttribute("key");
index aa327a483312f5e5a8f6507e1ae0d4cd703d2d7f..4109e853210dcba809ce547b1801c98b92907282 100644 (file)
@@ -3045,7 +3045,7 @@ public class Table extends AbstractSelect implements Action.Container,
 
             if (!actionHandlers.contains(actionHandler)) {
                 actionHandlers.add(actionHandler);
-                requestRepaint();
+                refreshRenderedCells();
             }
 
         }
@@ -3068,7 +3068,7 @@ public class Table extends AbstractSelect implements Action.Container,
                 actionMapper = null;
             }
 
-            requestRepaint();
+            refreshRenderedCells();
         }
     }
 
@@ -3078,7 +3078,7 @@ public class Table extends AbstractSelect implements Action.Container,
     public void removeAllActionHandlers() {
         actionHandlers = null;
         actionMapper = null;
-        requestRepaint();
+        refreshRenderedCells();
     }
 
     /* Property value change listening support */