Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
when Container fires ItemSetChange event?
Hi,
I built a BeanItemContainer subclass to add autocomplete function to BeanItemContainer. After Changing Container Content the ItemSetChange event is not fired (have a look at method filterItems).
public class QFAutoCompleteContainer extends BeanItemContainer<QFListEntry> {
private static final long serialVersionUID = -5729620881451564295L;
private QFDatabaseAccessService service;
private String[] itemPropertyID;
private String _table;
public QFAutoCompleteContainer(String Table, QFDatabaseAccessService service, String[] itemPropertyID) throws IllegalArgumentException {
super(QFListEntry.class);
this._table = Table;
this.service = service;
this.itemPropertyID = itemPropertyID;
}
@Override
protected void addFilter(Filter filter) throws UnsupportedFilterException {
SuggestionFilter suggestionFilter = (SuggestionFilter) filter;
filterItems(suggestionFilter.getFilterString());
}
private void filterItems(String filterString) {
[b] removeAllItems();
List<QFListEntry> items = service.filterTableInDatabase(filterString, _table, itemPropertyID);
addAll(items);[/b]
}
I registerd the ItemSetChangeListener like that:
window.cbProdukt.addItemSetChangeListener(new ItemSetChangeListener() {
@Override
public void containerItemSetChange(ItemSetChangeEvent event) {
// do some stuff here
}
});
Do I something wrong? I have no idea for different implementation. Can anybody help?
Thanks
Bernhard
Last updated on
You cannot reply to this thread.