spring mvc - Retun list of checkboxes using thymeleaf -


  <p  th:each="accommodationcategory,accommodationcategorystat : ${accommodationcategorylist}" >   <input type="checkbox" th:field="*{accommodationcategorylist[__${accommodationcategorystat.index}__].valid}" />   <label th:text="*{accommodationcategorylist[__${accommodationcategorystat.index}__].name}">label</label>   </p> 

accommodationcategory class has 2 attribute valid , name. form return list of accommodationcategory. can fill accommodationcategory's valid attribute checkbox, want fill name attribute using ${accommodationcategory.name} not user input. can't fill accommodationcategory's name attribute when post form.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -