Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Table how to clear data

Al Lestaire Acasio
6 years ago Dec 02, 2015 3:54am
Agata Vackova
6 years ago Dec 02, 2015 8:04am
Al Lestaire Acasio
6 years ago Dec 02, 2015 8:22am
Agata Vackova
6 years ago Dec 02, 2015 8:25am
Al Lestaire Acasio
6 years ago Dec 02, 2015 8:32am
Agata Vackova
6 years ago Dec 02, 2015 8:46am

I think, that the easiest way is:

table.removeAllItems();
List props = new ArrayList(getContainerPropertyIds());
for(Object prop: props){
   table.removeContainerProperty(prop);
}

 

Al Lestaire Acasio
6 years ago Dec 02, 2015 8:53am
Allan Nicholas Mwangi
6 years ago Dec 08, 2015 8:37am

table.removeAllItems(); //removes all data in the table except column headers/titles