我正在處理JSP標記。這裏是老行開始通過項目模型中的循環:如何評估動態/嵌套的Spring屬性佔位符表達式?
<c:forEach var="toc" items="${requestScope[formKey].model.sharingTocs}">
但代碼已被重構,因此模型路徑(以上model.sharingTocs
)現在是動態的,而不是固定的。現在通過JSP @attribute
傳遞到代碼:
<%@attribute name="path" required="true"%>
所以${path}
現在計算爲"model.sharingTocs"
。
items
現在如何分配?