title: Getting list of selected checkboxes in table
body: <p>This is what I have in table:</p>
  
  <pre><code>&lt;td&gt;&lt;g:checkBox name="book_${bookInstance.id}"/&gt; &lt;/td&gt;
  </code></pre>
  
  <p>And this is how I try to get selected instances:</p>
  
  <pre><code>params.each{
              if(it.key.startsWith("book_"))
                  books &lt;&lt; (it.key - "book_") as Integer
          }
  </code></pre>
  
  <p>I'm getting an empty list. How to fix this? I'm open to suggestions if u have a better solution.</p>