<logic:iterate id="messageA" indexId="i" name="listA" scope="request"> 
<bean:write name="messageA" property="aa"/><logic:iterate id="messageB" indexId="i" name="listA" scope="request"> 
<bean:write name="messageB" property="bb"/>
</logic:iterate>
<bean:write name="messageA" property="cc"/>
</logic:iterate>
根据id="XX"来区分。

解决方案 »

  1.   

    <logic:iterate id="messageA" indexId="a" name="listA" scope="request"> 
    <bean:write name="messageA" property="aa"/><logic:iterate id="messageB" indexId="a" name="listB" scope="request"> 
    <bean:write name="messageB" property="bb"/>
    </logic:iterate>
    <bean:write name="messageA" property="cc"/>
    </logic:iterate>
    根据id="XX"来区分。两个indexId="X"不要重名 indexId="a" 与indexId="b" 只是用来显示list有多少条信息而已。
      

  2.   

    indexID属性定义一个代表当前被遍历元素序号的变量,目的是为了在后面引用.
    <logic:iterate ...indexID="index"....
      <bean:write name="index"/>
    .....
      

  3.   

    <logic:iterate id="messageA" indexId="a" name="listA" scope="request"> indexId="a" 只是序号变量,楼上这样做<bean:write name="index"/>,还不如直接
    <%=a.intValue()+1%> 就可以显示序号了.
    </logic:iterate>
      

  4.   

    To feixue6511(飞):
    我知道你说的是logic标签里面的id和<bean:write里面的name对应。但是我说的问题不是这个问题啊。我说的是form表单里面<html:text 标签里面indexed为true的时候,只能和最近的<logic:iterate标签的关联。导致生成的代码里面<input type="text" name="aaa[i]" i只能跟着最近的<logic:iterate的indexId走。不能和外面那个indexId走。
      

  5.   

    有人知道么? 自己先顶一个免得沉下去了。HOHO