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.

Remove Children of TreeTable

Celvin Kattookaran
6 years ago Nov 17, 2015 6:30am
Alejandro Duarte
6 years ago Nov 17, 2015 1:57pm

Hi,

I think it has to be with the collection size. Anyway, if you are using Java 8, you can do:

childrenIDs.stream().forEach(expgrpgrid::removeItem);

If not, you have to do something like:

Object[] toRemove = childrenIDs.toArray();
int size = toRemove.length;

for (int i = 0; i < size; i++) {
    expgrpgrid.removeItem(toRemove[i]);
}

Hope that helps!

Celvin Kattookaran
6 years ago Nov 17, 2015 2:33pm

@Alejandro Thanks a lot, that did the trick.