• 1 reply
  • Latest Post - ‏2013-06-18T15:05:30Z by Michael Burati
14 Posts

Pinned topic How to add leaf node to dojo tree builder dynamically?

‏2013-06-18T12:21:15Z | builder dojo tree


i have constructed a tree hierarchy using dojo tree builder.When a node is clicked im passing the node value and displaying the content on the right hand side portlet,

Also i have to add tree node  from right hand side portlet by passing required content and show it  in the tree portlet can i achieve this.though im able to pass value ,but the tree shows the updated values only when the page is can i dynamically update the tree with its newly added leaf nodes..

if sample is  shared it will be much helpful

thanks in advance.....




  • Michael Burati
    Michael Burati
    2591 Posts

    Re: How to add leaf node to dojo tree builder dynamically?


    If you're already updating the data in the left portlet and a manual refresh is correctly showing your additional data in the tree, then the most straightforward next step may be to fire/catch a client event to that left portlet which refreshes its page with the new data.

    If you really must add to the tree without refreshing the page,  then you may be able to figure out the Dojo tree API from and use that API to add nodes dynamically, but it's not something the current tree builder is going to help you with because the builder runs at regen time to generate the page (JSP) before it's rendered, so it's already done all its work well before that point where the portlets are communicating.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.