You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Minerva CC <mi...@yahoo.com> on 2007/04/14 01:11:01 UTC
[S2] How to link Tree Node to another dynamic ajax div
Hi,
I followed the instruction for the tree tag and created a treeview. Now, I want to select a tree node and display some data in another ajax div.
This is how I created the treeview:
<s:tree theme="ajax"
rootNode="%{_rootNode}"
childCollectionProperty="_children"
nodeIdProperty="_id"
nodeTitleProperty="_name">
</s:tree>
This is what I would do to link ajax to the result action:
<s:url action="viewresult" id="resultUrl">
<s:param name="id" value="%{#id}" />
</s:url>
<s:div id="result" theme="ajax" href="%{resultUrl}" loadingText="Loading..." />
Now, the question is how do I know if a node is selected? using onSelected attribute to call a javascript function or dojo event? Then, how can I pass the select node id to the id in the action parameter?
I know this may be a simple question to most of you. But, I just didn't get it from the manual.
Thanks in advance for your help,
Willa
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: [S2] How to link Tree Node to another dynamic ajax div
Posted by Dave Newton <ne...@yahoo.com>.
--- Minerva CC <mi...@yahoo.com> wrote:
> I followed the instruction for the tree tag and
> created a treeview. Now, I want to select a tree
> node and display some data in another ajax div.
IIRC you need to use Dojo topics to do useful things
with tree events. Alas, I do not think they are
working currently as discussed in a thread a week or
two ago (where I swore my code worked but it had
apparently broken at least a few weeks before and I
hadn't noticed :/
For further details, search the archives for thread (I
don't recall the subject) and look for Manu Mahajan's
messages as he was the driver behind a potential fix.
https://issues.apache.org/struts/browse/WW-1813
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org