1
사용 JSP 우리는 (크기 6 span6된다) HTML 엘리먼트를 렌더링 할 수있다. 내 필드 목록 6, 3, 8, 4와 같은 크기의 4 개 요소가있는 경우 내가 thymeleaf하는 처음 몇 부분을 변환하려고Thymeleaf 렌더링
<div class="row">
<div class="span6">
<input />
<div>
<div class="span3">
<input />
<div>
</div>
<div class="row">
<div class="span8">
<input />
<div>
<div class="span4">
<input />
<div>
</div>
로는 HTML을 렌더링과 같은
<th:block th:with="size=0">
<th:block th:each="field, iterStat : ${fields}">
<th:block if="${iterStat.index == 0}">
<div class="row">
</th:block>
<th:block if="${iterStat.index == (#lists.size(${fields}) - 1)}">
</div>
</th:block>
</th:block>
</th:block>
그러나 div 태그 <div class="row">
이 시작된 <th:block>
내에서 닫히지 않으므로 thymeleaf에서 렌더링 할 수 없습니다. 위의 jsp 코드를 thymeleaf로 변환 할 수있는 방법이 있습니까?
나는 thymeleaf 2.0.17 및 spring3를 사용하고
... 대단히 감사합니다 :) – faizi
을 :
그런 다음 Thymeleaf 코드는 같을 것이다 : 그 일을 끝낼 것입니다 코드의 원유 조각되어 다음 @ faizi 환영합니다! – geoand