Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Carsten on Jun 04, 2009 06:13
open dhtmlx forum
dynamic context menu

Hi,

we are looking for a sulution of the following problem:
- we are using JBoss Rich Faces for generating an JSF Ajax tree
- each node can have a different context menu
- because there can be a lot of nodes we are looking for an dynamical rendered context menu which gets the menu items on the fly when the user clicks the node with the right mouse key

Can you please explain a solution with your dhtmlXMenuObject and enableDynamicLoading?

Thanks
Carsten
Answer posted by Support on Jun 04, 2009 08:11
>>enableDynamicLoading
This mode has sense if you have very big tree, and need to load parts of it on demand
To have menu in such mode just add the 
        menu.enableDynamicLoading("some.do");

where "some.do" - url of script which will be called for dyn. loading. Each time when new portion of menu will need to be loaded , the script will be called as
         some.do?parentId=SOME_VALUE
where SOME_VALUE - id of the item, for which sub-menu need to be loaded

http://dhtmlx.com/docs/products/dhtmlxMenu/samples/init/dynamic_loading.html?un=1244129481000