B4J Question JSON Tree as TreeView in a B4J Server App

johnerikson

Active Member
Licensed User
Longtime User
Is there anyone who built a simple Tree View function in a Server application B4J?
I'm trying to build on ' Json Tree Example ' in a B4J server application.
I discovered that a click on the root or child gave no event handling in the application.
What I want to accomplish is exactly as on the website - http://www.jsontree.com/
The question is whether I'm on the right track or if I need to solve my ' treeview ' needs in a completely different way, if it is the right track, what to do?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
SS-2015-03-22_09.36.34.png


See the attached web app example. It is based on this jQuery control: http://www.jstree.com/docs/json/
 

Attachments

  • jsTree.zip
    113 KB · Views: 414
Upvote 0

johnerikson

Active Member
Licensed User
Longtime User
Many thanks!
Your example is exactly what I need. Nice!
I have resolved to expand the tree with more nodes and children when you start the application, but not to add nodes with more children after the application started, other than to make reload on the html code. Not nice! In this case I read data from a database.
Is it possible to expand the nodes with additional child after starting the application without reload of html code?
Great way to save time and capacity!
 
Last edited:
Upvote 0

johnerikson

Active Member
Licensed User
Longtime User
No, not ws.flush, but I've tried using it now!
It doesn't look to have any effect. The tree is updated with new data, but does not appear on the screen. I can verify this by ' SelectedItem.SetText ("Selected node:" & sb.ToString) ' displays the updated content.
In any case, there will be no problem for me now, as limited amounts of data will be handled in the tree!
 
Upvote 0
Top