diff --git a/README.md b/README.md index 3fc4999..4d7a333 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ public class MyVaadinUI extends UI { LazyBeanContainer dataSource = new LazyBeanContainer(User.class, new UserDAO(), new UserSearchCriteria()); comboBox.setContainerDataSource(dataSource); comboBox.setItemCaptionPropertyId("firstName"); - layout.addComponent(comboBox);å + layout.addComponent(comboBox); } } diff --git a/src/main/java/org/vaadin/addons/lazycontainer/LazyBeanContainer.java b/src/main/java/org/vaadin/addons/lazycontainer/LazyBeanContainer.java index 1b1c210..3715985 100644 --- a/src/main/java/org/vaadin/addons/lazycontainer/LazyBeanContainer.java +++ b/src/main/java/org/vaadin/addons/lazycontainer/LazyBeanContainer.java @@ -21,7 +21,6 @@ public class LazyBeanContainer extends BeanContainer { // min filter string length, after this length is exceeded database calls are allowed private int minFilterLength; - public LazyBeanContainer(Class type, DAO dao, SearchCriteria criteria) { super(type); this.criteria = criteria; @@ -98,6 +97,12 @@ public void sort(Object[] propertyIds, boolean[] ascending) { } } + @Override + public boolean containsId(Object itemId) { + // we need this because of value change listener (otherwise selected item event won't be fired) + return true; + } + public int getMinFilterLength() { return minFilterLength; }