--- Manu Mahajan <[EMAIL PROTECTED]> wrote: > Do I have to use some dojo specific code here?
I've been using the Dojo binding stuff; my sample is from a pretty long time ago now but here it is in case it helps. It might just make things worse ;) The Javascript: function treeNodeSelected(nodeId) { alert("nodeId = " + nodeId); /* Normally I'm doing some Ajax on a select; I left * it here so you could see one way if you want. dojo.io.bind({ url: "<s:url action='foo/bar'/>", load: function(type, data, evt) { var displayDiv = dojo.byId("displayId"); displayDiv.innerHTML = data; }, mimeType: "text/html" }); */ }; // arg1: topic named in <s:tree.../> // arg2: not sure; don't remember // arg3: name of JavaScript handler. dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected"); The JSP: <s:tree theme="ajax" rootNode="%{rootNode}" childCollectionProperty="children" nodeIdProperty="id" nodeTitleProperty="name" treeSelectedTopic="treeSelected" toggle="explode" toggleDuration="0" cssClass="bptree" id="bptree"> I'll add this or something similar to the Wiki at some point, and I fixed the snippets that were giving an error. Question about snippets: is there a way to make them render properly? d. ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]