상세 컨텐츠

본문 제목

타임리프 템플릿 CRUD 테스트

JSP·자바·코틀린

by 김일국 2019. 12. 21. 13:46

본문

이전 포스트에서 [타임리프 템플릿 심화 테스트] 내용을 진행해 보았습니다.

스프링부트 thymeleaf 에서 input type option 태그를 이용하는 방법은 아래와 같습니다.

-----------------------------------------------------------------------

<div class="btn-group" data-toggle="buttons" th:each="category : ${categories}">
 <label th:class="${editPost.categoryId == category.id} ? 'btn btn-primary active' : 'btn btn-primary'">
  <input th:attr=onclick=|changeCategory('${category.name}')|" name="categoryId" type="radio" th:checked="${editPost.categoryId == category.id}" th:text="${category.name}" th:value="${category.id}" />
 </label>
</div>

-----------------------------------------------------------------------

-적용된 화면(아래 Categories부분)

- 오늘 작업소스(그래들+스프링부트2.2.0버전)

timespace_blog_20191221.zip
- 마이그레이션 이전 Git참조소스(메이븐+스프링부트1.5.1버전): https://github.com/wonwoo/spring-boot-clean-blog

Ps.
다음 작업은 [인텔리J+Gradle+SpringBoot2개발 댓글과 네비게이션 구현_6]을 진행할 예정 입니다.
 - http://wonwoo.ml/index.php/post/1252

timespace_blog_20191221.zip
8.23MB

관련글 더보기

댓글 영역