Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Tree control model binding

$
0
0

Hi all,

I need to develop a UI5 tree control based on a JSON model, retrieving children of each node dynamically from the server through ajax.

Specifically, I don't want to load all the contents from the server at once.

Additionally, I don't want to create nodes manually with addNode() method, which seems to be against the control-bound-to-model pattern

 

I'd like to create nodes in the model according to a parent/child association and these be bound to the nodes in the tree.

I can see that the Tree control has a bindNodes() method, which looks promising to bind the root of the tree.

I can also see that the TreeNode control has a toggleStateOpen handler, which might load further contents from the server.

 

However I am not sure whether this is the right approach or there's an easier route.

I'd be really grateful if anyone with experience on this matter might provide some insight.

Thanks a lot

Regards

Vincenzo


Viewing all articles
Browse latest Browse all 6178

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>