title: Delete all selected table rows with ZK
body: <p>I have a ZK grid in which I generate random numbers on each row. Each row is made up of a checkbox and the number itself.</p>
  
  <p>I wanted to have a button that deletes all the rows with checked checkboxes. Here is the event handler for the 'delete' button:</p>
  
  <pre><code>deleteButton.addEventListener(Events.ON_CLICK,
              new EventListener() {
  
          public void onEvent(Event evt) {
                  Iterator&lt;Component&gt; selected = randomTable.queryAll("row checkbox").iterator();
                  System.out.println("Deleted: ");
                  while (selected.hasNext()) {
                      Checkbox c = (Checkbox) selected.next();
                      if (c.isChecked()) {
                          System.out.print(c.getId()); 
                          System.out.println(" from row " + c.getParent().getId());
                          c.getParent().detach(); // detach the checked row
                      }
                  }
              }
          });   
  </code></pre>
  
  <p>But it deletes only the first checked row, even though it finds all the other checked ones.</p>
  
  <p>I'm still new to ZK. Any ideas?</p>