8 Replies Latest reply on Nov 9, 2009 4:08 AM by kanxg

    Help!  how to add pop up menu in the table head?

      The richfaces could add a context menu on the datatable, you can see the second demo in:
      http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu.jsf?c=contextMenu&tab=usage

      right click every element in table, the pop up menu will be shown.

      But in my case, I need to right click the table head to show the pop up menu. How to do it?
      I just attach the rich:contextmenu into the <f:facet name="header">, but it throw error.

      So how to do it?
      below is the code:

      ==================================
      <rich:contextMenu attached="false" id="menu" submitMode="ajax">
      <rich:menuItem ajaxSingle="true">
      <h:outputText value="#{messages.a}"/>
      </rich:menuItem>
      </rich:contextMenu>

      <f:facet name="header">
      <rich:columnGroup>
      <rich:componentControl event="onRowClick" for="menu" operation="show">
      <f:param value="#{propertyTooltip}" name="propertyTooltip"/>
      </rich:componentControl>
      <rich:column rowspan="2">
      ...........................