在百里香叶中反向迭代

时间:2016-07-25 16:00:29

标签: java html thymeleaf

我试图在Thymeleaf中反向迭代一个列表,但是th:每次迭代似乎都只是前进了。我的数组从最小到最大排序,我想创建最大到最小的DOM对象。这就是我所拥有的:

<li th:each="option : ${upgradeOptions}">
  <div class="billing__product-option">
    <div class="billing__product-duration" th:text="${...}">3 months</div>
    <div class="billing__payment-subtotal" th:text="${...}">$25</div>
    <div class="billing__payment-monthly-charge" th:text="${...} + tax')">$25</div>
    <div class="billing__payment-discount""></div>
    <input class="billing__button" type="button" value="Select" />
  </div>
</li>

有什么想法吗?

0 个答案:

没有答案