I am currently facing difficulties in populating a jstree within a Grails gsp. Here is what I have attempted so far (rewritten for clarity):
<script>
$("#treeView").jsTree();
</script>
<div id="treeView">
<g:each in="${atomMap}">
<li id="root"><a href="#">${it.key}<li>
<ul>
<g:each in="${it.value}">
<li><a href="#">${it.value}</a></li>
</g:each>
</ul>
</li>
</g:each>
</div>
On the page, my data initially appears as a list of bullets before the jstree replaces it with empty content. How can I connect the information in "atomMap" to the tree itself? Most example references I've found use static data for the "html_data" parameter within the tree.