summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/event
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-09-11 16:34:03 +0300
committerJuuso Valli <juuso@vaadin.com>2014-09-12 13:40:25 +0300
commit5020466294352484f75fbe64658ec79f6aa7a0e6 (patch)
tree0d0055c3fbe25cf7986240e6cd28137a0d4f0be1 /server/src/com/vaadin/event
parent9325ffe05b19b814d7e514a61d1c14dfe77ae156 (diff)
downloadvaadin-framework-5020466294352484f75fbe64658ec79f6aa7a0e6.tar.gz
vaadin-framework-5020466294352484f75fbe64658ec79f6aa7a0e6.zip
Make Vaadin component handling proxy-friendly (#14639)
Comparisons with the ==-operator between a proxy and it's underlying instance fail, so we should use a custom equals method instead. Change-Id: Iaa86ae830fecbedfb1f55636e25f5affebf5aba3
Diffstat (limited to 'server/src/com/vaadin/event')
-rw-r--r--server/src/com/vaadin/event/ActionManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java
index b42a5d8dde..6eb698d08a 100644
--- a/server/src/com/vaadin/event/ActionManager.java
+++ b/server/src/com/vaadin/event/ActionManager.java
@@ -78,7 +78,10 @@ public class ActionManager implements Action.Container, Action.Handler,
public <T extends Component & Container & VariableOwner> void setViewer(
T viewer) {
- if (viewer == this.viewer) {
+ // This somewhat complicated check exists to make sure that proxies are
+ // handled correctly
+ if (this.viewer == viewer
+ || (this.viewer != null && this.viewer.equals(viewer))) {
return;
}
if (this.viewer != null) {
@@ -113,7 +116,7 @@ public class ActionManager implements Action.Container, Action.Handler,
@Override
public void addActionHandler(Handler actionHandler) {
- if (actionHandler == this) {
+ if (equals(actionHandler)) {
// don't add the actionHandler to itself
return;
}