I am using struts framework in my project... I get the result set from database. I want to store it in a tree like data structure.. I want to set the parent and child nodes.. Is there any api available in struts that allow me to save the data in form of tree structure...
Thanks.<br />Paresh Doshi<br />SCJP 1.4
Joined: Feb 15, 2005
As I see it, the best option would be to create your own custom classes that map to the tree-structured model you are trying to create. For example, if you are modeling a company's chain-of-command organizational chart, you could create the following class:
Using a custom class like this to populate a tree structure is generally much better than using some generic tree/node classes because it's easier to read and understand what the organization is.