Spring/MVC Thymeleaf th:selected not working

前端 未结 5 2079
盖世英雄少女心
盖世英雄少女心 2021-02-09 14:34

I am building an application using Spring, Hibernate and of course Thymeleaf for the views. The application is centered around an Activity domain class (which is literally an i

5条回答
  •  别跟我提以往
    2021-02-09 14:43

    'th: field' automatically generates the 'id' and 'name' attributes, so if you want to use 'th: selected', you should remove 'th: field' and manually set them to work.

    I had the same problem and check the forum, 'th: selected' and 'th: field' does not work at the same time. check the forum

提交回复
热议问题