title: Thymeleaf many-to-many checkbox list
body: <p>I am porting an application from JSP to Thymeleaf.  So far i have found an equivalent to everything I was doing in JSP EXCEPT for this.  I have a role entity that has a many-to-many relationship with the permission entity, probably a very typical setup.  In JSP I used to be able to edit the role and map each permission to a checkbox, like this :</p>
  
  <pre><code>&lt;form:checkboxes element="li" items="${systemPermissions}" path="permissions" itemValue="id" itemLabel="name" id="systemPermissions"/&gt;
  </code></pre>
  
  <p>This takes a List object from the model and maps all the allowed permissions by checking each checkbox accordingly.  Super simple, super concise, but unfortunately I am not finding a way to do this with Thymeleaf.</p>
  
  <p>Is there a way with Thymeleaf to dynamically create a checkbox list and map a many-to-many relationship to it?</p>
  
  <p>Thanks!</p>