That code is wrong as this line:
dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");
is using "this" which is not gonna be defined there. Try:
dojo.event.topic.subscribe("treeSelected",
function treeNodeSelected(nodeId) {
dojo.io.bind({
url: "<s:url value='dynamicTreeSelectAction.action'
/>?nodeId="+nodeId,
load: function(type, data, evt) {
var displayDiv = dojo.byId("displayId");
displayDiv.innerHTML = data;
},
mimeType: "text/html"
});
}
);
musachy
On 8/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've been trying to get the tree view code from the showcase to work for many
> days now, and I'm literally stuck. I use logging to determine whether action
> methods are called or not, and the following script never gets to the
> dynamicTreeSelectAction action:
>
> <script>
> function treeNodeSelected(nodeId) {
> dojo.io.bind({
> url: "<s:url value='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>
>
> Is it written properly in the showcase example (which doesn't work btw)? or
> is there another way of calling an action as part of the url?
>
> Thanks for any help,
> Session
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]