2 Replies Latest reply on Oct 30, 2012 8:00 AM by sivainvi

    Cannot get the contextMenu to show

    sivainvi Newbie

      Hi, I'm using RichFaces 4.2.3.Final and have a problem showing a contextMenu for an rich:extendedDataTable


      I have the following xhtml:


                <rich:tabPanel id="tabsCods" itemChangeListener="#{bBean.selectTabListener}">
                          <rich:tab id="tabCods" header="Cods">
                                    <rich:extendedDataTable id="tableCods" selectionMode="single" 
                                              style="width: 100%; height: 100px" 
                                              value="#{bBean.cods}" var="cod">
                                              <a4j:ajax event="selectionchange"
                                                        listener="#{bBean.selectCodListener}" render="tableSubCods"/>
                                              <rich:column width="20px">
                                                        <f:facet name="header"><h:outputText value=""/></f:facet>
                                                        <h:graphicImage value="../images/cod_#{cod.no}.gif" width="15" height="15" />
                                    <rich:contextMenu id="mnuTableCods" target="tableCods" mode="ajax">
                                              <rich:menuItem label="Edit" render="tableAfs" oncomplete="#{rich:component('pp')}.show();"
                                                  mode="ajax" icon="/images/edit.png"/>


      but when I rightclick on a row of the extendedDataTable, nothing happens (it shows the browser default context menu).


      I only got to see the contextMenu when I put

      <a4j:outputPanel ajaxaRendered="true">


      around the datatable, but this has side effects regarding reloading the table and scrolling to top when I select a row, so its not a solution.


      Thanks in advance.