summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Alhroos <john.ahlroos@itmill.com>2011-04-27 11:30:16 +0000
committerJohn Alhroos <john.ahlroos@itmill.com>2011-04-27 11:30:16 +0000
commit9e1732482bc62587e9db723fa25df06d8110f112 (patch)
tree8c5be8505fbd36bdb2e036bfc1080473b0838a7d /src
parent7d6dd579706895978a31a39d225810e1816e3a62 (diff)
downloadvaadin-framework-9e1732482bc62587e9db723fa25df06d8110f112.tar.gz
vaadin-framework-9e1732482bc62587e9db723fa25df06d8110f112.zip
Simplified if-else conditional for actions #5992
svn changeset:18494/svn branch:6.6
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/ui/Table.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index f0416a2059..b14df2cdaa 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -2151,18 +2151,12 @@ public class Table extends AbstractSelect implements Action.Container,
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);
- }
}
}
}