Skip to content
Advertisement

Reloading and deleting from Vaadin ListBox

I am using a ListBox in Vaadin 14, populated by setItems with a list of custom objects. There two things I did not find out how to do:

  • Reload the listbox when the list of items hast changed
  • Deleting a certain object from the listbox

Advertisement

Answer

You can add/remove items from the underlying collection, and then call ListBox.getDataProvider().refreshAll().

For example,

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement