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

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -