summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/data/util
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@itmill.com>2011-04-26 09:54:17 +0000
committerHenri Sara <henri.sara@itmill.com>2011-04-26 09:54:17 +0000
commita41e7247119a465f8ffe7e5f7f305875b83c4aec (patch)
tree921810bae23792d032bda7d2935034e29317481f /src/com/vaadin/data/util
parentb5d94db69f69d6006673a00217ce2a2bee1901b7 (diff)
downloadvaadin-framework-a41e7247119a465f8ffe7e5f7f305875b83c4aec.tar.gz
vaadin-framework-a41e7247119a465f8ffe7e5f7f305875b83c4aec.zip
#6572 added comments
svn changeset:18453/svn branch:6.6
Diffstat (limited to 'src/com/vaadin/data/util')
-rw-r--r--src/com/vaadin/data/util/AbstractBeanContainer.java4
-rw-r--r--src/com/vaadin/data/util/IndexedContainer.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/AbstractBeanContainer.java b/src/com/vaadin/data/util/AbstractBeanContainer.java
index 7ed8e731b9..f19833ccfa 100644
--- a/src/com/vaadin/data/util/AbstractBeanContainer.java
+++ b/src/com/vaadin/data/util/AbstractBeanContainer.java
@@ -214,6 +214,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
}
itemIdToItem.clear();
+ // fire event only if the visible view changed, regardless of whether
+ // filtered out items were removed or not
if (origSize != 0) {
fireItemSetChange();
}
@@ -281,6 +283,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
// remove item
itemIdToItem.remove(itemId);
+ // fire event only if the visible view changed, regardless of
+ // whether filtered out items were removed or not
if (size() != origSize) {
fireItemRemoved(position, itemId);
}
diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java
index 11ab3c2728..6c8e5f0f2e 100644
--- a/src/com/vaadin/data/util/IndexedContainer.java
+++ b/src/com/vaadin/data/util/IndexedContainer.java
@@ -212,6 +212,8 @@ public class IndexedContainer extends
items.clear();
+ // fire event only if the visible view changed, regardless of whether
+ // filtered out items were removed or not
if (origSize != 0) {
// Sends a change event
fireItemSetChange();
@@ -275,6 +277,8 @@ public class IndexedContainer extends
int origSize = size();
int position = indexOfId(itemId);
if (internalRemoveItem(itemId)) {
+ // fire event only if the visible view changed, regardless of
+ // whether filtered out items were removed or not
if (size() != origSize) {
fireItemRemoved(position, itemId);
}