Once I corrected those 2 syntactic errors I still couldn't get it to do what you described. I had to add in an expanded root node as well.

As far as I can tell, autoLoad: true doesn't do a great deal in this example.

Once I'd fixed all those problems I could then see the scenario you've described. I believe the problem here surrounds the use of a root on the reader. For reasons I don't entirely understand, the root config option is used by a TreeStore to determine the property that contains the child nodes. Quite why there isn't a separate option called childProperty I don't know. Maybe I'm missing another config option somewhere but as far as I could tell the following configuration is the simplest way to do it:

Once I corrected those 2 syntactic errors I still couldn't get it to do what you described. I had to add in an expanded root node as well.

As far as I can tell, autoLoad: true doesn't do a great deal in this example.

Once I'd fixed all those problems I could then see the scenario you've described. I believe the problem here surrounds the use of a root on the reader. For reasons I don't entirely understand, the root config option is used by a TreeStore to determine the property that contains the child nodes. Quite why there isn't a separate option called childProperty I don't know. Maybe I'm missing another config option somewhere but as far as I could tell the following configuration is the simplest way to do it:

First of all, thanks for taking the time to read and try my case. It's nice to see people willing to help like you!

I apologize for my code, I pasted it at work before I went out and it seems I didn't copy well all the information. The JSON response (1) and the tools (2) are ok, it was my mistake when trying to copy the example and removing all the information that were no relevant.

About the 3) point, I've added "expanded" true to all the nodes that were not "leaf", but the problem was that for each of these nodes, it was sending a request automatically to ask for the children.

Finally, about 4), the TreeStore doesn't use the "autoLoad" property? I wanted to load the tree at the moment of instantiation.

I'm not at work right now, but tomorrow I'll give your example a try and I'll tell you how it goes.

About the 3) point, I've added "expanded" true to all the nodes that were not "leaf", but the problem was that for each of these nodes, it was sending a request automatically to ask for the children.

I think you've misunderstood. The point I was making is that I couldn't get your code to work without adding a root node to the store (I wasn't referring to the root in your JSON or in the reader). You can ignore what I said about it being expanded, that's the default anyway with rootVisible: false.

All that said, once you've got all of this working it should be possible to put expanded: true on all the non-leaf nodes if that's what you want. Currently it isn't picking up the children at all so setting the nodes to expanded will just force them to load remotely as you've described.

Finally, about 4), the TreeStore doesn't use the "autoLoad" property? I wanted to load the tree at the moment of instantiation.

As far as I can tell that setting won't do it. Setting the root node to expanded will force it to load immediately. As I've already mentioned, this is the default with a hidden root.

Using "expandAll" after the store is loaded is having the same effect that using expand: true in all non leaf nodes. It fires a request for each of the non leaf nodes, even if all the nodes are loaded in the first request.

The thing is that I'd like to return additional information besides the nodes in the response. I still don't understand why it doesn't work using the root property of the reader. BUT.. using the suggestion of skirtle worked: