dimanche 6 avril 2014

Problem: Mixing of structure and state information in treenodes

Use case:



Assume, you have a address store and a category treestore. Each treenode in the treestore has the checked attribute. The treestore is used in two treepanels (A and B)



The checkbox nodes in Treepanel A are for assigning one or more categories to one address.



The checkbox nodes in Treepanel B are for filtering the address store by category.



If I now expand or check a node in one treepanel, the same action is repeated in the other treepanel. That is bad. The Treepanels should share the tree structure but not the tree state.



My workaround is to create a copy of the category store and use this copy in treepanel B. The problem is now: if I change the tree structure (getting, adding, removing, renaming or moving nodes) in one treestore, I have to write application code to keep the data in the treestore copy in sync. This is bad too.



Please take the chance in this major version and move the tree state information from the treenode to the treeview or find another clever fix.



Thanks.




Aucun commentaire:

Enregistrer un commentaire