You can simply create instances of org.apache.pivot.wtk.content.TreeBranch and TreeNode programmatically rather than declaring them in WTKX. If you haven't seen it, you may find the WTKX Primer handy for understanding how WTKX maps to Java:
http://pivot.apache.org/tutorials/wtkx-primer.html Here is an example that dynamically creates tree data: http://svn.apache.org/repos/asf/pivot/trunk/tools/src/org/apache/pivot/tools/json/JSONViewer.java Hope this helps, Greg On Apr 19, 2010, at 6:10 PM, Patrick Shea wrote: > Hi, I'm trying to dynamically populate a treeview but I don't see any > examples on how to do this, I only see xml based examples. > > Does anybody have a code snippet of programatically building a treeview? > > Thanks > Patrick >
