GSP Pagination and Checkboxes

Viewed 4

I am wondering if it is possible to have checkbox states transfer over to the next page on a GSP, I am new to web development so I was wondering if anyone could provide me with any advice.

Currently, this is how I am utilizing my checkboxes:

<table>
<thead>
<tr></tr>
</thead>
<tbody>
<g:each in="${itemList}" status="i" var="instance">
   <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
   <td>
     <g:checkBox name="selected"value="${instance.id}" checked="false" />
   </td>
   </tr>
   </g:each>
</tbody>

And this is the pagination I am utilizing:

 <div class="pagination">
        <g:paginate total="${total}" params="${params}"/>
    </div>

My issue is that the checkboxes do not persist while traversing the pages - is there a simple way I could solve this?

0 Answers
Related