What is way to select enum from database? I have:
<select name="country">
<c:forEach items="${countries}" var="value">
<option value="${value}">${value}</option>
</c:forEach>
</select>
I have in class and table ‘User’ field string/varchar ‘country’
Use the option and options tags from the spring forms tld.
If I understand it correctly, you will have to add
YourEnum.values()to the model, say as “enumValues” (according to comments below, this is not necessary).Reference: