From 187962d1ac38768c868c648d16ee6645f5ca9896 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 25 Jul 2011 13:56:07 +0000 Subject: [PATCH] #7224 Table context menu does not work before refreshing table contents svn changeset:19924/svn branch:6.7 --- .../vaadin/terminal/gwt/client/ui/VScrollTable.java | 11 +++++++++-- src/com/vaadin/ui/Table.java | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 63e6cc8415..ba076eb0ed 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -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"); diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index aa327a4833..4109e85321 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -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 */ -- 2.39.5