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
Get ALL Items (also filtered) of TreeTable and Order of TreeTable
Hello i have to do some normal things with the treetable. But i don't know how i can do it:
- My TreeTable represents some questions with text. The user can filter the questions and bring them to order (with drag & drop). So if he save the questions, for sure, you have to save them all. But i don't know how to get them all, also the filtered. I am extending HierarchicalContainer and make the getAllItems public. That works but...
- Now my second problem. The allItems is a List and not ordered. I don't know how i can get a list with all items and exactly the order of the current tree. For example:
- I am adding with drag & drop or with a button a question with id 1
- Then a second question with id 2
- And the third question with id 3 between them
- My expecation of the index for id 1 - index:1, id 2 - index:3, id 3 - index:2
- But they are not in the order which i can see them in the tree: id 1 - index:1, id 2 - index:2, id 3 - index:3
That's simply wrong. How can i get the items in exactly the way i can see them in the treetable and how can i get all my questions?
There is a method in the treetable getVisibleItemIds() which returns only the visible ones. But why the hell returns getItemIds() also only the visible ones and not in the right order? Is my use case so rarely?
Last updated on
You cannot reply to this thread.