3 Replies Latest reply on Feb 29, 2008 1:58 PM by Fabrizio Boco

    How to controllo wich column can trigger contextMenu in a da

    Fabrizio Boco Newbie

      Hi,

      I am using contextMenu on a dataTable

      <rich:contextMenu attached="false" id="menu" submitMode="ajax">
      
       <rich:menuItem ajaxSingle="true" value="#{msgs.list_E1_display}" actionListener="#{E1Manager.poupMenuSelectItem}" action="#{E1Manager.initDisplay}" requestDelay="1" >
       <a4j:actionparam name="selectedId" value="{selectedBean}" />
       </rich:menuItem>
       .....
      </rich:contextMenu>
      


      <rich:dataTable id="e1" var="e1" rows="25" value="#{e1List}" width="100%" ... >
       <rich:column>
       <f:facet name="header"> </f:facet>
       <h:selectBooleanCheckbox id="selections" value="#{selections[e1]}" />
       </rich:column>
      
       <rich:column>
       <f:facet name="header"> </f:facet>
       <h:graphicImage url="../img/action.gif" id="pic" />
       </rich:column>
      
       <rich:column>
       .....
       </rich:column>
      
       <rich:column>
       .....
       </rich:column>
      
       <rich:componentControl event="onRowClick" for="menu" operation="show" >
       <f:param value="#{e1.id}" name="selectedBean"/>
       </rich:componentControl>
      </rich:dataTable>
      


      The problem is that the contextMenu is opened by a click on each column, the first to which contains the check box. In other words the context menu appears also when I select or unselect the radio button.

      Is there any way to control which column can trigger the context menu ?

      Thank you

      Fab.