I’m using GWT CellTree to build a left-side navigation menu. There is no straight-forward way to traverse from the selected object to its parent node in a CellTree. One approach is to use recursion to walk through the tree and the other one is to design the business model in such a way that you map the children to their parents.
For example, a metric category can have subcategories (which are Metric Categories again) and Metric Items.
Metric Category
|
|_ Metric Category
|_ Metric Item
From your experience, do you know of any advantages / disadvantages with the above approaches?
Answering my own question –
There seem to be no obvious advantages or disadvantages with both of the approaches. Designing the business model to support it seems to be better as it gives more flexibility (just that you need to write more code).