spring mvc - Input an enum value in a form as hidden using thymeleaf -
i fill form input hidden using value of enum:
enum:
public enum tipoendereco { residencial, comercial }
summarizing html code, i've tried use form input this:
<input type="hidden" th:field="*{endereco[0].tipoendereco}" th:value="residencial"/>
but unfortunately, field being recorded null. others fields don't use enum in way, being recorded normal. i've used enum fill option, directly input type hidden isn't working. i'm using thymeleaf.
Comments
Post a Comment