• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recursive Tree Problem

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

I am developing one application using hibernate and JSP.
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....


 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want us to tell you how to generate the HTML for that or what?? A general recursive solution to this problem would be that you create a method which accepts a User object, iterates over the List<User> and calls itself (i.e. recursive call to the method itself) with each element in the List...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic