티스토리 뷰

반응형
원하는 상황 특이사항 용법
if item in item_list   <div th:text="${#lists.contains(product.testList, '33')}"/>
  checkbox th:checked="${#lists.contains(product.selectedTemplates, '' + template.id)}"


[stackoverflow.com/questions/20666635/thymeleaf-lists-contains-expression-utility-not-working]
checkbox already checked checkbox <input type="checkbox" name="active" th:checked="${user.active}" />
checkbox already checked checkbox <input type="checkbox" name="mycheckbox" th:checked="${flag} ? 'checked'">

[stackoverflow.com/questions/29826576/thymeleaf-how-to-add-checked-attribute-to-input-conditionally]
select and checked select <select class="form-control" id="categoryId" name="categoryId">
<option th:each="category: ${categories}"
th:selected="${category.categoryId==product.category.categoryId}"
th:text="${category.categoryName}"
th:value="${category.categoryId}"></option>

</select>
     
     
     
     

 

반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함