This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recursive Tree Problem...

 
Sanket L Shah
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi all,

I am developing one application using hibernate and Swing.
I am having one user class.



I have given lazy = "false" in user.cfg.xml. When I run this program using void main... it works well...
now my problem is how can I iterate loop so i can get all the data in tree structure...
I wanted to display the data in Tree Structure... but not able to write correct recursive loop...
Please help me out.....

Thank you so much....


 
Jeff Storey
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanket,

What have you tried so far? What comes to mind is iterating over each user and printing out its sub-users recursively, for example:



This assumes there are no cyclical relationships. This may not be exactly what you want, but hopefully it should help get you started.

Jeff
 
Sanket L Shah
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hey tha Jeff Storey
MY problem is solved......
Thank you so much....
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic