PDA

View Full Version : TreePanel and outputformat=JSON



Fredric Berling
16 Jun 2008, 4:25 AM
Im trying to build a Tree with the Treepanel object . My idea is to build the tree from the documents in a view using readviewentries&outputformat=JSON.
Problem is that the TreePanel requires that there are certain attributs present in the JSON.
Like "children" to be able to build a tree out of it.

Anyone has any nice ideas to approach this?. Creating the json in an agent suddenly seems very "stone age". Maybe there is some kind of xpath blabla thing that can alter the output from domino ?

Im new to TreePanel so any other suggestions would be appriciated. Maybe some XML approach?

RWaters
21 Jun 2008, 10:41 AM
The current implementation of UIOutline translates the domino ReadEntries XML from outlines. I'm sure something similar would work here. I would take a look at that code for a reference point. JSON is always going to be the easier route if you can do it.