diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-09-03 10:43:06 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-09-03 10:43:06 +0000 |
commit | bfd1816dc28e09a492697125b9b3b9e97b730d62 (patch) | |
tree | cfdc71c2913bea8e80c3f23db295b106714c6160 /src | |
parent | 582622cddc7d5fc4227119368670d0be64b9b46f (diff) | |
download | vaadin-framework-bfd1816dc28e09a492697125b9b3b9e97b730d62.tar.gz vaadin-framework-bfd1816dc28e09a492697125b9b3b9e97b730d62.zip |
Fix for #5539 - Removing the last shortcut from a window won't completely unregister the shortcut on the client side
svn changeset:14710/svn branch:6.4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/event/ActionManager.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/vaadin/event/ActionManager.java b/src/com/vaadin/event/ActionManager.java index 36e2e21ef5..621a2413b9 100644 --- a/src/com/vaadin/event/ActionManager.java +++ b/src/com/vaadin/event/ActionManager.java @@ -38,6 +38,8 @@ public class ActionManager implements Action.Container, Action.Handler, protected Component viewer; + private boolean clientHasActions = false; + public ActionManager() { } @@ -141,7 +143,11 @@ public class ActionManager implements Action.Container, Action.Handler, actions.addAll(ownActions); } - if (!actions.isEmpty()) { + /* + * Must repaint whenever there are actions OR if all actions have been + * removed but still exist on client side + */ + if (!actions.isEmpty() || clientHasActions) { actionMapper = new KeyMapper(); paintTarget.addVariable(viewer, "action", ""); @@ -175,6 +181,12 @@ public class ActionManager implements Action.Container, Action.Handler, paintTarget.endTag("actions"); } + /* + * Update flag for next repaint so we know if we need to paint empty + * actions or not (must send actions is client had actions before and + * all actions were removed). + */ + clientHasActions = !actions.isEmpty(); } public void handleActions(Map variables, Container sender) { |