I have an HTTP Server which responses with JSON strings. They look like this:
{
...
"value":{
"children":[
{
"path":"KEY_518693",
"name":"KEY_518693",
"children_count_overall":0,
"children_page":1,
"children_pages":1,
"children_pagesize":10
...
}
],
"children_count_overall":1,
"children_page":1,
"children_pages":1,
"children_pagesize":1,
"name":null,
"path":null,
...
}
}
Every request has the parent node (in "value"), for which I requested the children and this children (in "children"), also some paging informations.
If no parent node was specified, it returns the root node as child of a virtual root node.
I set the "root" property of the proxy to "value", so the proxy knows where to search for the nodes, but the tree member of my TreeStore has a strange Structure after a load():
tree: {
childNodes: [
{
childNodes: [], <-- no child?
data: {
children: [
{ ...the raw data of the "children" node (like in the example above)...}
],
... the data of the "value" node and some data from the implicit node model...
}
}
]
}
Somehow the object in "value" gets converted to a node and inserted into the tree, but it's objects in the "children" array won't get converted and end up as data of this "value"node.