Yes, I've tried with those options. I'm not getting any debug output in
this case.
Can anyone verify if the struts showcase app examples work. Because to
me it seems that they don't either. Here's code from the sample app.
<!-- START SNIPPET: treeExampleDynamicJsp -->
<script>
function treeNodeSelected(nodeId) {
alert(nodeId)//added by manu for testing
dojo.io.bind({
url: "<s:url
value='/tags/ui/ajax/dynamicTreeSelectAction.action' />?nodeId="+nodeId,
load: function(type, data, evt) {
var displayDiv = dojo.byId("displayId");
displayDiv.innerHTML = data;
},
mimeType: "text/html"
});
};
dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");
</script>
<div style="float:left; margin-right: 50px;">
<s:tree
theme="ajax"
rootNode="%{treeRootNode}"
childCollectionProperty="children"
nodeIdProperty="id"
nodeTitleProperty="name"
treeSelectedTopic="treeSelected">
</s:tree>
</div>
<div id="displayId">
Please click on any of the tree nodes.
</div>
<!-- END SNIPPET: treeExampleDynamicJsp -->
I have added the alert in the function. It never seems to get called.
Dave Newton wrote:
--- Manu Mahajan <[EMAIL PROTECTED]> wrote:
function treeNodeSelected(){
alert('Temporary like Achilles')
}
dojo.event.topic.subscribe("/treeSelected",
this, "treeNodeSelected");
<s:tree id="contentTree"
theme = "ajax"
rootNode="%{category}"
childCollectionProperty="categoryList"
nodeIdProperty="id"
nodeTitleProperty="name"
toggle="expand"
toggleDuration="0"
treeSelectedTopic="/treeSelected"
>
</s:tree>
I just don't see anything immediately wrong; the only
differences are the arguments to the JavaScript
function (did you try with a single argument like
mine?) and the "/" in the topic, which definitely
shouldn't matter (but try it anyway).
You're getting no debug output?
I have a feeling that I'm missing some dependancy.
Do i need anything apart from the jars in the blank
app?
I don't know, but I doubt it. Dojo is contained inside
S2 (at least for 2.0.6; which version are you using
again?)
d.
____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]