Login Register

Refresh tree on the fly using JSP

Hi

I am new to dojo and having some problems with the tree component.
I have used the basic examples in order to display a simple tree using static txt file (in JSON format), however when I am manually changing the data in the JSON file (as it might happen in my application) I don’t see the tree being changed.
I am using JSP to generate a JSON like file which will have all the items I want to show in the tree, the JSP query the database for the information and construct a JSON string and return it.
I am using the following code

Where menuGroup.jsp should return the JSON string
However, after the first load, it seems like the tree will not refresh and show the new added items.
I searched around and it might be related to some caching issues?
It might be that I am doing it all wrong and should initialize the tree programmatically?
Does the tree need to live in a DOJO base content pane?
Any basic example that retrieves the data using a JSP (or any other server side) on the fly and construct a new tree based on the returned data would be great.

Thanks for the help

Nir