From 7fc1c4c0d18680ba34e8f0cb779d91e12742ee3a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 1 Mar 2010 15:21:36 +0000 Subject: [PATCH] #4170 - IndexedContainer.addItemAfter(null, Object) does not work svn changeset:11565/svn branch:6.3 --- src/com/vaadin/data/util/IndexedContainer.java | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5