我有 as:iterator 它正在迭代一个属性列表,对于列表中的每个项目都有属性键、值和类别。基于类别,我需要将值填充到迭代器内部定义的 div 中。我正在使用 jquery 选项卡。这里的迭代器没有正确迭代。请看代码很容易理解
<div id="tabs">
<ul>
<li><a href="#channel">Channel</a></li>
<li><a href="#connection">Connection</a></li>
</ul>
<s:iterator value="property" status="rowstatus">
<div id="channel">
<s:if test="(property[#rowstatus.index].category=='Channel')">
<table>
<tr><s:hidden name="property[%{#rowstatus.index}].key" />
<td><s:label value="%{property[#rowstatus.index].key}"> </s:label></td>
<td> <s:textfield name="property[%{#rowstatus.index}].value">
</s:textfield>
</td>
</tr>
</table>
</s:if>
</div>
<div id="connection">
<s:if test="(property[#rowstatus.index].category=='Connection')">
<table>
<tr><s:hidden name="property[%{#rowstatus.index}].key" />
<td><s:label value="%{property[#rowstatus.index].key}"></s:label></td>
<td> <s:textfield name="property[%{#rowstatus.index}].value">
</s:textfield>
</td>
</tr>
</table>
</s:if>
</div>
</s:iterator>
</div>