Tree select item bind fail
8 Dec 2011 10:51:08 GMT
14 Dec 2011 15:22:32 GMT
14 Dec 2011 15:22:32 GMT
A simpler way to reproduce is:
Create one tree with the follow structure:
->Ford
-->Cars
---> GT90
---> Indigo
---> Model U
->Fiat
-->Cars
---> Oggi
---> Stilo
---> Punto
And bind the selected Item property to an View Model
If the tree is totally opened and you select the "Cars" item from "Fiat" node, the selected item will be set to "Cars" item in "Ford" node.
I hope this information helps.
This issue is really disturbing me.
Thanks in advance.
Best Regards,
Thiago Lacerda
15 Dec 2011 00:44:06 GMT
ZK - Open Source Ajax Java Framework
Hi Folks,
In my domain model i have a many-to-many relationship that i have to show as tree.
the problem is when i have the same object in two diferent parents of the tree. When the selected item is changed, the binding system marks the first ocurrence of the object in the tree as selected.
Ex:
--> Item 1
------> SubItem1
--> Item 2
------> SubItem2
--> Item3
------> SubItem1
------> SubItem2
ps: Subitens with the same name have the same object in value property.
If i click in Item3>Subitem1, the binding system marks Item1>Subitem1 as selected.
I think that the binding system should compare the TreeItem(or TreeNode) instance instead of the bean instance to mark as selected in UI.
Is there any way to distinguish an instance from another in the tree?