summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Button.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/Button.java')
-rw-r--r--server/src/com/vaadin/ui/Button.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java
index 02b7689259..d248efd570 100644
--- a/server/src/com/vaadin/ui/Button.java
+++ b/server/src/com/vaadin/ui/Button.java
@@ -463,7 +463,6 @@ public class Button extends AbstractComponent implements
*
*/
public static class ClickShortcut extends ShortcutListener {
- protected Button button;
/**
* Creates a keyboard shortcut for clicking the given button using the
@@ -476,7 +475,8 @@ public class Button extends AbstractComponent implements
*/
public ClickShortcut(Button button, String shorthandCaption) {
super(shorthandCaption);
- this.button = button;
+ setTarget(button);
+ setTargetAction("click");
}
/**
@@ -492,7 +492,8 @@ public class Button extends AbstractComponent implements
*/
public ClickShortcut(Button button, int keyCode, int... modifiers) {
super(null, keyCode, modifiers);
- this.button = button;
+ setTarget(button);
+ setTargetAction("click");
}
/**
@@ -510,7 +511,7 @@ public class Button extends AbstractComponent implements
@Override
public void handleAction(Object sender, Object target) {
- button.click();
+ // Action handled on the client side
}
}