diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-09-05 15:20:27 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-09-05 15:02:00 +0000 |
commit | ab17dd711cc3b5200b61b5fd81de81de44c17979 (patch) | |
tree | f9426caab1e1a485f5756b4a73cd5d22873d8fbe /client | |
parent | fa855d99842e2a0cb316df0986c6090f6a3c0a8e (diff) | |
download | vaadin-framework-ab17dd711cc3b5200b61b5fd81de81de44c17979.tar.gz vaadin-framework-ab17dd711cc3b5200b61b5fd81de81de44c17979.zip |
Revert "Tree item fails with ItemClickListener (#14388)"
This reverts commit d71ae18e355468487a947c84d0f92ed9c44b002e
which caused regression on #6845.
Converted TreeItemClickListeningTest (#6845) to TB4.
Change-Id: Ia4c7c5814dc4e8916ab3f80633ceecdfb74040b0
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTree.java | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/client/src/com/vaadin/client/ui/VTree.java b/client/src/com/vaadin/client/ui/VTree.java index caa728ab21..b12053ea04 100644 --- a/client/src/com/vaadin/client/ui/VTree.java +++ b/client/src/com/vaadin/client/ui/VTree.java @@ -160,13 +160,6 @@ public class VTree extends FocusElementPanel implements VHasDropHandler, private boolean selectionHasChanged = false; - /* - * to fix #14388. The cause of defect #14388: event 'clickEvent' is sent to - * server before updating of "selected" variable, but should be send after - * it - */ - private boolean sendClickEventNow = false; - /** For internal use only. May be removed or replaced in the future. */ public String[] bodyActionKeys; @@ -478,15 +471,9 @@ public class VTree extends FocusElementPanel implements VHasDropHandler, Command command = new Command() { @Override public void execute() { - /* - * we should send selection to server immediately in 2 cases: 1) - * 'immediate' property of Tree is true 2) sendClickEventNow is - * true - */ client.updateVariable(paintableId, "selected", selectedIds.toArray(new String[selectedIds.size()]), - sendClickEventNow || immediate); - sendClickEventNow = false; + immediate); selectionHasChanged = false; } }; @@ -844,7 +831,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler, // server. We do not want to send the event if there is a // selection event happening after this. In all other cases // we want to send it immediately. - sendClickEventNow = true; + boolean sendClickEventNow = true; if (details.getButton() == MouseButton.LEFT && immediate && selectable) { @@ -862,13 +849,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler, } client.updateVariable(paintableId, "clickedKey", key, false); - - /* - * in any case event should not be send immediately here - - * send after updating of "selected" variable - */ client.updateVariable(paintableId, "clickEvent", - details.toString(), false); + details.toString(), sendClickEventNow); } }); } |