This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 755
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: 755
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]

 
Consider Paul's rocket mass heater.
 
subject: Struts 2 : Dojo Tree : Get the ID of selected node.