How do I find node level / depth of recursive tree table?
eevictimDec 31 2010 — edited Dec 31 2010Guys,
Using Studio Edition Version 11.1.1.3.0.
After 2-3 days of banging my head up against the monitor, I'm ready to ask for help. I admit it: I'm a noob, and can't figure out how to get the node level / depth of a treeTable. I haven't seen this mentioned in the forums or in any of the treeTable examples on the various blogs. Google, God praise it, has failed me as well.
In my Parent->Child->Recursive Child (References Child's view object) tree table I've tried:
1) Various EL expressions (my EL sucks) in an output text within the node. Hoping that something like #{node.HierTypeBinding.Parent.etc.} would yield some kind of valuable info I could manipulate.
2) Setting the node value to a managed bean, but don't know how to get the currently rendered node. I can only figure out how to get the currently selected node, which is only helpful after the table has already been rendered.
3) Creating a transient field called Level in the Child view object and setting its ViewRowImpl equal to the parent's Level + 1, but if the Child has multiple parents, I get incorrect calculations. I got the farthest with this, but eventually gave up. Accessing entities via ViewLinks works great for moving through child rows, but trying to get a node's parent is baffling if you've got multiple parents.
4) Both saying "Please!" and various colorful four-letter metaphors. Neither had much of an effect.
Any kind of general direction or help would be great.
Thanks guys,
Will