1

我以分层方式使用索引属性,如下所示。

在 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"。

任何建议最感谢..

4

0 回答 0