[Dojo-interest] need coding help for creating a context menu on right click on any node of the dijit.tree widget

Tapan Ghia tapan.ghia at gmail.com
Mon Aug 25 14:17:48 UTC 2008


Hey..

I saw these Examples where in a context menu is triggered on right click on
the complete div.
And this divs can be specified as a string array for the attribute
targetNodeIds
For this the code i found is: 
<div dojoType="dijit.Menu" id="submenu1" contextMenuForWindow="false"
targetNodeIds="tree" style="display: none;">

What if i want the context menu, only to trigger when i right click on a
specific node of the tree?
And the tree is being generated programmatically ie i am creating a json
object from the data coming from the back end and generating a tree using
this json object, So i can not keep a track of the div ids of nodes of the
tree.

So please can you suggest a method to associate a context menu to a node
rather than associating the context menu with the complete div.

Hope you got my question.. :)

Thanks



Karl Tiedt wrote:
> 
> http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/test_Tree.html
> 
> Example has lived in that test case for many many releases now ;)
> 
> -Karl Tiedt
> 
> 
> On Mon, Aug 25, 2008 at 6:16 AM, Tapan Ghia <tapan.ghia at gmail.com> wrote:
> 
>>
>> Hi,
>> I want to know how we trigger a context menu on right click on any tree
>> node
>> using AJAX, Dojo V1.1.0 or V1.0.9 and IE6.
>> All the examples or code snippets i came across on various sites are
>> outdated, i mean these examples mostly use older versions of dojo.
>>
>> could anyone please help me out for free source code.
>> Thanks in advance.
>> --
>> View this message in context:
>> http://www.nabble.com/need-coding-help-for-creating-a-context-menu-on-right-click-on-any-node-of-the-dijit.tree-widget-tp19128577p19128577.html
>> Sent from the Dojo mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> 
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
> 
> 

-- 
View this message in context: http://www.nabble.com/need-coding-help-for-creating-a-context-menu-on-right-click-on-any-node-of-the-dijit.tree-widget-tp19128577p19144690.html
Sent from the Dojo mailing list archive at Nabble.com.



More information about the Dojo-interest mailing list