I'm trying to make a simple page like the one in the struts showcase app
that displays a tree, and when the user clicks a node, the page will display
information about that node. The problem is however, that the documentation
on the tree-tag is scarce and the example in the showcase app (version 2.0.8)
doesn't work. It seems the event processing isn't working. Here's what I'm
trying to work up from:

<script language="JavaScript" type="text/javascript">
   dojo.event.topic.subscribe("treeSelected", function
treeNodeSelected(node)) {
       alert("It works!");
   });
</script>

<s:tree
   id="dep_structure"
   theme="ajax"
   rootNode="%{department}"
   childCollectionProperty="children"
   nodeIdProperty="id"
   nodeTitleProperty="name"
   toggle="explode"
   treeSelectedTopic="treeSelected" />

I've also tried the approach in the showcase app, but it doesn't work
either. So how can I subscribe to the events sent by the tree constructed
with the tree-tag?

Reply via email to