Hello,
I am relatively new to Vaadin and I am sure I am missing something. The ‘problem’ I am having is that several of my branches have leaves with duplicate captions, but only the last duplicate leave is shown. The backing tree objects are POJOs where I have set the
toString()
function generate the item’s unique id.
What I am expecting to see:
[font=courier new]
Policy A
- Recommendations
1.1 Account Policies
1.1.1 Enforce Password Histroy- Password History Memory is Equal to 24
Policy B
- Password History Memory is Equal to 24
- Recommendations
1.1 Account Policies
1.1.1 Enforce Password Histroy- Password History Memory is Equal to 24
[/font]
- Password History Memory is Equal to 24
What I am actually seeing:
[font=courier new]
Policy A
- Recommendations
1.1 Account Policies
1.1.1 Enforce Password Histroy
Policy B
- Recommendations
1.1 Account Policies
1.1.1 Enforce Password Histroy- Password History Memory is Equal to 24
[/font]
- Password History Memory is Equal to 24
I have confirmed that each item does have a unique id, the only thing that is the same is the caption, which doesn’t make sense. I have also tested building my tree where there were no duplicated captions and all the leaves were displayed as expected.
The code I am using to add the leaves is:
tree.addItem(tmpPolicyTest);
tree.setItemCaption(tmpPolicyTest, tmpPolicyTest.getName());
tree.setParent(tmpPolicyTest, parentItem);
tree.setChildrenAllowed(tmpPolicyTest, false);
Thanks in advance for any insight!
Sean