-
1. Re: How to generate context menu programatically on each sho
petr.gola Feb 13, 2008 7:09 AM (in response to petr.gola)I've tried
<a4j:support event="oncontextmenu" reRender="folderTreeMenu" />
... but without results. Any idea how to suggest folderTreeMenu to rerender on user's action (right click for example)? -
2. Re: How to generate context menu programatically on each sho
petr.gola Feb 14, 2008 5:02 AM (in response to petr.gola)I used reRender="folderTreeMenu but it does not re-process binding attribute. Is there any way to do this?
-
3. Re: How to generate context menu programatically on each sho
fabmars Feb 14, 2008 10:03 AM (in response to petr.gola)Maybe some binding ?
-
4. Re: How to generate context menu programatically on each sho
petr.gola Feb 14, 2008 10:32 AM (in response to petr.gola)Do you mean binding attribute? This doesn't work - binding is processed only once, on page loading. Not on "reRender" request!
I've spent a lot of time by searching for solution... I divide this problem into serveral points - I can't solve all of them together.
1. listen on "oncontextmenu" event (... event="oncontextmenu")
2. call server side code to regenerate menu component model (create menu items dynamically) (... action="#{folderTreeBean.regenerateMenu}")
3. reRender menu component (...reRender="folderTreeMenu")
4. show the menu component by js function "show" with parameters (... operation="show")
I) 1+4 I can reach by use <rich:componentControl event="oncontextmenu" operation="show"> ... parameters ... </...>
... but there is no way to run action and reRender.
II) when I use <a4j:support>, I can 2+3, but listen only on native js function (no oncontextmenu, only onmousedown...). Unfortunatelly, I can't call js function for show context menu with parameters. -
5. Re: How to generate context menu programatically on each sho
darmstadter Feb 21, 2008 11:04 AM (in response to petr.gola)Hi, Petr.gola, have you found the solution? I have the same problem, the context menu can only be loaded at the beginning of pageload.