I'm developing a web application with java spring mvc , and I need to list items in a dynamic checkboxList and include a select option on each item.
Something that in html would be similar to the code below:
<ul>
<li>
<input type="checkbox"> Item 1 -
<select>
<option value="1">Ativo</option>
<option value="2">Inativo</option>
<option value="3">Bloqueado</option>
</select>
</li>
<li>
<input type="checkbox"> Item 2 -
<select>
<option value="1">Ativo</option>
<option value="2">Inativo</option>
<option value="3">Bloqueado</option>
</select>
</li>
<li>
<input type="checkbox"> Item 3 -
<select>
<option value="1">Ativo</option>
<option value="2">Inativo</option>
<option value="3">Bloqueado</option>
</select>
</li>
</ul>
How can I dynamically do this in jsp? Remembering that the items in the checkbox come from the database.