brud
brud

Reputation: 173

Vaadin: Dynamically modifying Tabs in a TabSheet

Let's say I have Four Tabs.

There are some other tabs, which have the above Tabs as their parent.

For Example,

Tab1 : Parent: none, Tab2: Parent: none, Tab3: Parent: Tab2.

Say if I get this information during Run time, and I parse it to find their parents.

If I have a tab that has no parents, I simply create a new Tab and add this tab to it.

Now once I find that I have a tab which has a parent Tab, I need to go to the parent tab, and append this tab to it.

How do I achieve this?

Upvotes: 1

Views: 499

Answers (1)

brud
brud

Reputation: 173

A simple recursive traversal over a Stack which stored the components, and a description equality evaluator for them to find the match did the trick.

Upvotes: 2

Related Questions