1 Reply Latest reply on Jul 12, 2011 10:18 AM by Marc Schmucki

    extendeddatatable select on right mouse click

    Sascha Janz Master

      i use an extendeddatatable plus a contextmenu on it.

      
      <rich:extendedDataTable stateVar="#{MyBean.statevar}" selectionMode="single" rowKeyVar="rkv" activeClass="active-row" selectedClass="active-row" style="margin-left:10px;margin-right:10px;border:1px" value="#{MyBean.entries}" var="data" id="wftbl" tableState="#{MyBean.mywfstate}"
       rows="18" cellpadding="0" cellspacing="0" width="1140px" selection="#{MyBean.wfselected}" >
       <rich:column id="rc4" style="text-align:left;" label="Ampel" >
       <f:facet name="header" >
       <h:outputText value="Ampel" />
       </f:facet>
       <center> <h:graphicImage value="#{data.ampel}" id="c4" /></center>
      
       </rich:column>
      </rich:extendedDataTable>
      
       <a4j:outputPanel ajaxRendered="true">
       <rich:contextMenu id="menuwf" attachTo="wftbl"
       event="oncontextmenu">
       <rich:menuItem target="/wfindex.xhtml" id="openwflink"
       eventsQueue="eventQueue" submitMode="ajax" value="Anzeigen"
       limitToList="true" reRender="globalmessage"
       action="#{MyBean.gotowfindex}">
       <a4j:actionparam name="currentstate"
       assignTo="#{MyBean.currentstate}" value="read" />
       </rich:menuItem>
      
       </rich:contextMenu>
       </a4j:outputPanel>
      


      but now the user must first left click to select a row then right click to get context menu.

      is it possible to select and get contextmenu with one right click?