title: Select a row with thymeleaf and th:each
body: <p>I'm using thymeleaf to display a list of objects, like this:</p>
  
  <pre><code>&lt;tr th:each="Reports : ${report}"&gt;
  &lt;td&gt;&lt;span th:text="${Reports.id}"&gt;Id&lt;/span&gt; &lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.description}"&gt;Description&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.entity}"&gt;Entity&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.long}"&gt;Long&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.lat}"&gt;Lat&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.type}"&gt;Type&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span th:text="${Reports.solved}"&gt;Solved&lt;/span&gt;&lt;/td&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;div class="btn-group"&gt; 
  &lt;button type="button" class="btn btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"&gt;Azione&lt;/button&gt;
  &lt;div class="dropdown-menu"&gt; 
   &lt;a class="dropdown-item" href="#"&gt;Solved&lt;/a&gt; &lt;div class="dropdown-divider"&gt;&lt;/div&gt; 
  &lt;a href="" class="dropdown-item"&gt;Not Solved&lt;/a&gt; 
  &lt;/div&gt; 
  &lt;/div&gt; 
  &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and it works of course. Now, I need to modify the value of "solved" with the value taken from the button present in each row, so I would take just the id (which is my primay key) and the button value to send via post to another url. How can i achieve that?</p>