aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-03-01 15:21:36 +0000
committerArtur Signell <artur.signell@itmill.com>2010-03-01 15:21:36 +0000
commit7fc1c4c0d18680ba34e8f0cb779d91e12742ee3a (patch)
treeaf37e6b94a7352d058d68e5f44972323abc7973f /src
parent3863c0c269c6c28e04e593ceab09fec4302eadbd (diff)
downloadvaadin-framework-7fc1c4c0d18680ba34e8f0cb779d91e12742ee3a.tar.gz
vaadin-framework-7fc1c4c0d18680ba34e8f0cb779d91e12742ee3a.zip
#4170 - IndexedContainer.addItemAfter(null, Object) does not work
svn changeset:11565/svn branch:6.3
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/data/util/IndexedContainer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java
index f5dddf5e23..3d4a98fb97 100644
--- a/src/com/vaadin/data/util/IndexedContainer.java
+++ b/src/com/vaadin/data/util/IndexedContainer.java
@@ -548,6 +548,11 @@ public class IndexedContainer implements Container.Indexed,
* java.lang.Object)
*/
public Item addItemAfter(Object previousItemId, Object newItemId) {
+ // Adding an item after null item adds the item as first item of the
+ // ordered container.
+ if (previousItemId == null) {
+ return addItemAt(0, newItemId);
+ }
// Get the index of the addition
int index = -1;