我已經創建了一個地圖
Map<String, Map<Integer,String>>
在DTO和使用thymeleaf如下訪問它在HTML:如何在百里香中使用嵌套地圖?
<div class="popupui" th:each="lang,st : ${session.languages}" >
< label th:text="#{'language.label.' + ${lang.languageName} }" >English < /label>
<input type="text"
th:field="*{languageMap['answerAlternative'][${st.count}]}"
th:id="'name-' + ${lang.languageId}" class="languageId"/><a
th:class="'flag-' + ${lang.languageName}" href="#"></a>
</div>
甲processingException在th:field="*{languageMap['answerAlternative'][${st.count}]}"
來臨了我還測試了上述第:場與:
<input type="text"
th:field="*{languageMap[ __${'answerAlternative'}__][__${st.count}__]}"/>