]> source.dussan.org Git - vaadin-framework.git/commitdiff
Simplified if-else conditional for actions #5992
authorJohn Alhroos <john.ahlroos@itmill.com>
Wed, 27 Apr 2011 11:30:16 +0000 (11:30 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Wed, 27 Apr 2011 11:30:16 +0000 (11:30 +0000)
svn changeset:18494/svn branch:6.6

src/com/vaadin/ui/Table.java

index f0416a20590dcc1dd400d858de55df88df817a24..b14df2cdaa6661a94d4b8bc006c15f7b6d318dca 100644 (file)
@@ -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);
-                    }
                 }
             }
         }