【发布时间】:2018-10-31 05:14:46
【问题描述】:
我想显示模型属性列表。但是我收到了类似的错误
org.thymeleaf.exceptions.TemplateProcessingException:无法解析为表达式:
"(${storeInfo.storeStatus} == 'InActive')? (color:red):(color:black)""
下面是代码,请帮忙
<select id="storeDropDown" th:field="*{storeId}" name="storeId" class="form-control input-md mb-md">
<option value="NA" th:name="stareStatus" th:text="#{reports.selectStore}">
</option>
<option th:each="storeInfo : ${storeInfoList}" th:value="${storeInfo.storeId}" th:style="(${storeInfo.storeStatus} == 'InActive'||'Active')? (color:red):(color:black)" th:text="${storeInfo.storeName}" th:name="${storeInfo.storeStatus}"></option>
【问题讨论】: