1 Reply Latest reply on Dec 29, 2015 8:06 AM by dako ak

    extendedDataTable: avoid selectionChange event on double click

    dako ak Newbie

      Hi all,


      I have an extendedDataTable with a selectionchange event and selectionMode="single". Furthermore I work with the attribute "onrowdblclick" wich invokes a JavaScript function.


      <rich:extendedDataTable id="myTable" ... selectionMode="single" var="item"
                              selection="#{myController.selection}" onrowdblclick="showPageByDoubleClick('#{item.id}');">
                              <a4j:ajax event="selectionchange" listener=...


      My question is, how can I prevent the extendedDataTable from invoking the selectionchange event if the user has double clicked a row?

      On double click I forward to a new page and the selectionchange event takes too much time, thus the page forwarding is delayed. We have very strict performance requirements.


      I'am using RichFaces 4.5.9


      Best regards

        • 1. Re: extendedDataTable: avoid selectionChange event on double click
          dako ak Newbie

          Ok, everything I had to do is to work with a queue and to group both requests in one queue. The queue treats both requests as the same request and thus the ignoreDupResponses attribute is working.



          <h:form id="myform">
          <a4j:queue name="overviewSelectionQueue" ignoreDupResponses="true" requestDelay="200"/>
          <a4j:jsFunction name="editWithDoubleClick" action="#{myController.editWithDoubleClick}">
              <a4j:param name="selectedId" assignTo="#{myController.selectedId}" />
              <a4j:attachQueue name="overviewSelectionQueue" requestGroupingId="overviewSelection"/>
          <rich:extendedDataTable id="myTable" value="#{myController.myList}" var="item" selectionMode="single"
                                  selection="#{myController.selection}" onrowdblclick="editWithDoubleClick('#{item.id}');">
                <a4j:ajax event="selectionchange" listener="#{myController.overviewTableSelectionChanged}"
                     execute="@this" limitRender="true">
                     <a4j:attachQueue name="overviewSelectionQueue" requestGroupingId="overviewSelection"/>