【发布时间】:2020-08-10 22:11:08
【问题描述】:
我正在尝试在 html 表中添加一个数字,该数字将显示在电子邮件中。
到目前为止,我的代码如下:
<th:block th:each="param, rowStat: ${someList}">
<th style="..." th:utext="#{some.translation(${param}, ${rowStat.count})}">superscript</th>
</th:block>
“someList”是一个简单的字符串列表,“some.translation”如下:
{0} (moreInfo)<sup>{1}</sup>
我想要达到的目标是:
String1 (更多信息)1
String2 (更多信息)2
我的问题是 thymeleaf 异常说在这种情况下禁止访问变量“param”。访问“rowStat.count”工作正常。
如果有更简单的方法来显示上标数字,我也可以。
【问题讨论】:
标签: java html spring thymeleaf