4 Replies Latest reply on Sep 22, 2008 11:37 AM by moldovan

    Right-click ContextMenu on a dataTable row

    powerhouse_b

      Hello,

      The demo on the site shows a ContextMenu attached to a data table row on RowClick event. Using "oncontextmenu" event does not work. I have tried adding the context menu inside the table, as in the first example, without using rich:componentControl, but no luck here.

      Is there a way to do this it is not supported yet?

        • 1. Re: Right-click ContextMenu on a dataTable row

          The second example demonstrates that you can attach the context menu not only to right mouse click (oncontextmenu), but on any other event like onRowClick. Also, the second example shown that you can share and parametrize the same instance of the context menu.
          It is possible to use contextMenu without componentControl, but the even you try to attach to should be supported by the component.

          So, what the code snippet that is suppose to work from your point of view?

          • 2. Re: Right-click ContextMenu on a dataTable row
            powerhouse_b

            Using componentControl, the fallowing code does not work (for me) with "oncontextmenu" event.

             <rich:contextMenu id="menu" attached="false" submitMode="ajax" >
             <rich:menuItem style="text-align: left;">
             <b>URL</b> {url}
             </rich:menuItem>
             <rich:menuItem value="#{messages.wslistmenu_availability}" style="text-align: left;"/>
             </rich:contextMenu>
            


            and inside a datatable

            <rich:componentControl event="oncontextmenu" for="bodyform:menu" operation="show" rendered="#{Authentificator.authentificated}">
             <f:param name="url" value="#{webservice.url}"/>
             </rich:componentControl>


            I am using Rihchfaces 3.2.0 RC1.



            • 3. Re: Right-click ContextMenu on a dataTable row
              ilya_shaikovsky
              • 4. Re: Right-click ContextMenu on a dataTable row
                moldovan

                Any update on this topic with the attribute onRowContextMenu?

                JIRA-Entry is open since February, but nothing is done until now....
                Does this topic has to few votes?

                Actual, I've attached contextMenu via componentControl on onRowClick-event to dataTable.
                But in my situation, it would be better (I don't wanna say: it is essential) if the contextMenu shows on right click.

                Regards