我正在以分层方式使用索引属性,如下所示。
在queForm中:
public AnswersLk getAnswerItr(int index)
{
if (this.answerList == null)
{
this.answerList = new ArrayList();
}
while (index >= this.answerList.size())
{
this.answerList.add(new AnswersLk());
}
return (AnswersLk)this.answerList.get(index);
}
在Jsp:
<logic:iterate id="queItr" indexId="queIndex" scope="request" name="queForm" property="questionList">
<li><a href="#tab1">OVERVIEW/SUBMARKET</a></li>
<div id="tab1">
<logic:iterate id="answerItr" indexId="ansIndex" scope="request" name="queItr" property="answerList">
<bean:write name="answerItr" property="ansName" filter="false"/>
</logic:iterate>
</div>
</logic:iterate>
我收到的错误就像找不到bean:“answerItr”在任何范围内。
任何建议最欣赏..