Created
August 19, 2011 14:49
-
-
Save akinsgre/1156970 to your computer and use it in GitHub Desktop.
Java object for DynaTree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Thing { | |
private String title ; | |
private List<Thing> children ; | |
public Thing(String title) { this.title = thing ); | |
// getters and settors accordingly | |
} | |
List<Thing> things = new ArrayList<Thing>() ; | |
things.add(new Thing("One")); | |
/* | |
based on that, I think that toJSONObject(things) will result in | |
[{title:"One"}] | |
and adding additional Things with children will cause the additional objects to fall in the correct structure | |
This, of course, ignores that Dynatree can have attributes like "key" and "isFolder".. that that is pretty self explanatory | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment