This shouldn't be hard to implement. The JSON used to get the child nodes of an expanded node (or the root node) can include descendants, i.e. for each direct child node we can include its children, and for those children we can include their children, and so on. No change require on the client side (jstree deals directly with this JSON). Normally the only changes required are to:
add the new macro parameter
use it in XWiki.DocumentTreeMacros, which generates the JSON; to be precise here, instead of returning a boolean to indicate if the node has children, we can return the actual child nodes (JSON).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.