From 0fb51d11929a4cf42ac1a318e6fa6495ccc607cb Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 4 Aug 2010 06:35:37 +0000 Subject: #5405 better javadoc for BeanItemContainer constructor svn changeset:14402/svn branch:6.4 --- src/com/vaadin/data/util/BeanItemContainer.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/com/vaadin/data') diff --git a/src/com/vaadin/data/util/BeanItemContainer.java b/src/com/vaadin/data/util/BeanItemContainer.java index 00f8cf9834..7c54e87fc6 100644 --- a/src/com/vaadin/data/util/BeanItemContainer.java +++ b/src/com/vaadin/data/util/BeanItemContainer.java @@ -139,6 +139,13 @@ public class BeanItemContainer implements Indexed, Sortable, Filterable, * {@link BeanItemContainer#BeanItemContainer(Class)} can be used for * creating an initially empty {@code BeanItemContainer}. * + * Note that when using this constructor, the actual class of the first item + * in the collection is used to determine the bean properties supported by + * the container instance, and only beans of that class or its subclasses + * can be added to the collection. If this is problematic or empty + * collections need to be supported, use {@link #BeanItemContainer(Class)} + * and {@link #addAll(Collection)} instead. + * * @param collection * a non empty {@link Collection} of beans. * @throws IllegalArgumentException -- cgit v1.2.3