From 9d4104bd1b9f132aebad45eb983eb7f5b961c3ae Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Wed, 27 Apr 2011 11:33:14 +0000 Subject: [PATCH] Simplified if-else conditional for actions in Tree as well #5992 svn changeset:18495/svn branch:6.6 --- src/com/vaadin/ui/Tree.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/com/vaadin/ui/Tree.java b/src/com/vaadin/ui/Tree.java index 38dbfdae75..e47d9c7909 100644 --- a/src/com/vaadin/ui/Tree.java +++ b/src/com/vaadin/ui/Tree.java @@ -443,18 +443,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (st.countTokens() == 2) { final Object itemId = itemIdMapper.get(st.nextToken()); final Action action = (Action) actionMapper.get(st.nextToken()); - if (action != null && containsId(itemId) + if (action != null && (itemId == null || containsId(itemId)) && actionHandlers != null) { - // Item action for (Handler ah : actionHandlers) { ah.handleAction(action, this, itemId); } - } else if (action != null && actionHandlers != null - && itemId == null) { - // Body action - for (Handler ah : actionHandlers) { - ah.handleAction(action, this, null); - } } } } -- 2.39.5