我有一个:每个循环都有一个显示按钮。
<li th:id="${'button-' + row.name }" th:unless="${row.name == 'linkedin' or row.name == 'slideshow'}" class="collection-item avatar" th:each="row, rowStat: *{arButtons}">
<img th:src="${'/images/buttons/' + row.name + '.png'}" th:alt="${row.name}" class="circle"/>
<div class=" input-field col s12">
<input th:field="*{arButtons[__${rowStat.index}__].name}" type="hidden" />
<input th:field="*{arButtons[__${rowStat.index}__].data}" th:id="${'button-'+rowStat.index}" type="text" class="validate" />
<label th:if="${row.name == 'call'}" th:for="${'button-'+rowStat.index}" th:text="${call}"> Phone number </label>
<label th:if="${row.name == 'mail'}" th:for="${'button-'+rowStat.index}" th:text="${mail}"> Email </label>
<label th:if="${row.name == 'link'}" th:for="${'button-'+rowStat.index}" th:text="${link}"> Web Link </label>
<label th:if="${row.name == 'video'}" th:for="${'button-'+rowStat.index}" th:text="${video}"> Video </label>
</div>
</li>
现在我不想每次都使用row.name来显示方便文本是否有办法使用
<label th:for="${'button-'+rowStat.index}" th:text="${${row.name}}"> </label>
请知道!
答案 0 :(得分:4)