B4J Question JSON Tree as TreeView in a B4J Server App

Discussion in 'B4J Questions' started by johnerikson, Mar 21, 2015.

  1. johnerikson

    johnerikson Active Member Licensed 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?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Attached Files:

  3. johnerikson

    johnerikson Active Member Licensed 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: Mar 22, 2015
  4. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried to run the jstree method again with the new data (and then call ws.flush)?
     
  5. johnerikson

    johnerikson Active Member Licensed 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!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice