This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 : Dojo Tree : Get the ID of selected node. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 : Dojo Tree : Get the ID of selected node." Watch "Struts 2 : Dojo Tree : Get the ID of selected node." New topic
Author

Struts 2 : Dojo Tree : Get the ID of selected node.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi,

I have created a tree with struts 2, and i want to get the id of the clicked node. So i have created on topic and one subscriber. and as you can see the subscriber callback method has 3 arguments.

but my understanding of this 3 arguments are not clear...

The format of the Data, request

How do i retrieve the id of selected node.

I have looked into the dojo events docs but couldn't find anything helpful.

Can anybody point me to the right tutorial.. or help me out with it...



Jigar Naik


Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi

In the below subscriber



in the alert box i am getting following value:

Is this a JSON Object, if yes how do i parse the JSON object, i want to retrieve the ID property of leaf node.

[StrutsTreeNode Tree:[StrutsTree ID:Admin] IDataSource TitleataSource]

 
 
subject: Struts 2 : Dojo Tree : Get the ID of selected node.
 
Similar Threads
Implementing Dojo
DOJO Tree using 0.4
Help with Struts 2 Dojo Tree Widget
Struts 2 | How to populate a form by selecting a value from a table in the same page
Javscript problem