Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I find node level / depth of recursive tree table?

eevictimDec 31 2010 — edited Dec 31 2010
Guys,

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
This post has been answered by Navaneetha Krishnan Nataraj on Dec 31 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2011
Added on Dec 31 2010
2 comments
2,462 views