我想穿过一个
ArrayList
和
Set
集合对象,使用Struts嵌套标记。我已经附上了我的代码片段。
<snested:iterate property="productsList" id="aProduct">
<snested:iterate property="participantList" id="participant_item">
......
<snested:text property="firstName" styleClass="text"/>
</snested:iterate>
</snested:iterate>
在这里
participantList
是
设置
和
productsList
是
List
。
在上述代码中,我遇到以下错误:
Invalid argument looking up property: "productsList[0].participantList[0].firstName" of bean: "orderedProducts"
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:887
at org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:126)
但如果我使用
列表
而不是
设置
收集它工作得很好。