I use a custom TreeViewModel instead of handling selection events.
When a user clicks on a level 1 node, TreeViewModel.getNodeInfo(...)
method is called
The method creates a data provider that corresponds to the type of
value parameter.
The data provider initiates an RPC call in its constructor.
When the data provider receives results back from the server it
populates itself with the data received by calling updateRowCount()
and updateRowData()
This works well when the number of children under parent node is
small. If it is large AbstractDataProvider<T>.onRangeChanged() can be
used to query only currently visible children.
Is this something you are looking for?