Skip to main content

Yahoo Tree

2 replies [Last post]
nnxcoder
Offline
Joined: 2008-02-02
Points: 0

Hi there,
I have a Yahoo tree and would like to call different pages when clicked upon the child nodes. Can someone tell me what is the best way to do this? Do I have to use the publish/subscribe mechanism?

Thanks,
--Narasimha

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
carlavmott
Offline
Joined: 2005-02-10
Points: 0

Hi Narasimha,


Using the pub/sub mechanism will be the easiest way to do this. If you mean you want to load different pages when you click on a node then you can add an action to the nodes. I created an app which publishes a url to the "/jmaki/dcontainer" topic which will then loads the page(which is part o the app) in a dcontainer (jmaki dynamic container). You will need to add the dcontainer widget to a container in the page.


Here is what your page should look like:

<div id="leftSidebar" style="height:400px">



value="{

root : {

label : 'Yahoo Tree Root Node',
expanded : true,

children : [

{ label : 'Test.jsp', action:{topic:'/jmaki/dcontainer/setInclude', message: {targetId: 'page', value:'test2.jsp'}}},

{ label : 'Node 1.2',
expanded : true,

children : [

{ label : 'Node 3.1',

action : { topic : '/foo/select', message : {targetId : 'bar'}}

}

]

}

]

}

}"/>



</div>


<div id="center" style="height:400px">

</div>

nnxcoder
Offline
Joined: 2008-02-02
Points: 0

Hi Carla,
Thanks for your help. It worked.

--Narasimha