title: Delete elements from a dynamically updated data table
body: <p>I have a Richfaces <strong>1.2</strong> dataTable that is updated every 2 seconds using a a4j:poll request. It sends a request to the server and reRender the table adding new elements and changing the state of existing elements.</p>
  <p>On top of that, I want to be able to delete rows from this table using a button, but the problem is that it’s possible to send a delete request (button) AND an update request (poll) at the same time, causing a concurrent call exception.</p>
  <p>Any ideias on how to keep the table dynamically updated and be able to send delete requests at the same time? What I was trying to do is blocking the poll request when a delete button is clicked, make the delete request, and then get back at sending requests to update the table.</p>
  <p>Queue of requests maybe?</p>
  <p>Here's a simplified snippet of the code:</p>
  <pre class="lang-html prettyprint-override"><code>    &lt;a:form id=&quot;orders&quot;&gt;
              
              &lt;a:poll id=&quot;pollUpdateOrders&quot; 
                  interval=&quot;2000&quot;
                  reRender=&quot;outputPanelOrders, pollUpdateOrders&quot;
                  action=&quot;#{bean.getOrders()}&quot; /&gt;
              
              &lt;a:outputPanel id=&quot;outputPanelOrders&quot;&gt;
                  
                  &lt;r:dataTable id=&quot;tabelOrders&quot; 
                      title=&quot;Orders&quot; var=&quot;orders&quot;
                      value=&quot;#{bean.getOrders()}&quot; &gt;
                      
                          &lt;r:column&gt;
                              &lt;f:facet name=&quot;header&quot;&gt;
                                  &lt;h:outputText value=&quot;Code&quot; /&gt;
                              &lt;/f:facet&gt;
                              &lt;h:outputText
                                  value=&quot;#{order.code}&quot; /&gt;
                          &lt;/r:column&gt;
                  
                          &lt;r:column&gt;
                              &lt;f:facet name=&quot;header&quot;&gt;
                                  &lt;h:outputText value=&quot;Description&quot; /&gt;
                              &lt;/f:facet&gt;
                              &lt;h:outputText
                                  value=&quot;#{order.description}&quot; /&gt;
                          &lt;/r:column&gt;
  
                          &lt;r:column&gt;
                              &lt;a:commandLink id=&quot;deleteOrder&quot;
                                  action=&quot;#{bean.deletOrder(order)}&quot; /&gt;
                          &lt;/r:column&gt;
                  &lt;/r:dataTable&gt;
              &lt;/a:outputPanel&gt;
      &lt;/a:form&gt;
  </code></pre>