当前位置: 代码迷 >> Web前端 >> Struts2标签运用之s:iterator
  详细解决方案

Struts2标签运用之s:iterator

热度:774   发布时间:2012-10-27 10:42:26.0
Struts2标签使用之s:iterator
<table id="xmfzrTable" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr class='tdcontent'>
     <td width="60%" noWrap class="subtitle">7、课题名称</td>
     <td width="40%" noWrap class="subtitle">8、课题负责人推荐人选</td>
    </tr>    
           <s:iterator value="kt" status="st">
            <tr class='tdcontent'>
            <td>
            <s:checkbox name="check" onclick="checkA(this)" cssStyle="width:80%" theme="simple"></s:checkbox>
            <input type="hidden" name="kt[%{#st.index}].xmid.projectId" value='<s:property value="xmfzr.projectId"/>'/>
            </td>
             <td width="60%" noWrap class="subtitle"> 
           <s:textfield name="kt[%{#st.index}].ktmc" cssStyle="width:80%" theme="simple"  cssClass="input-text-line-readonly"></s:textfield></td>
    <td width="40%" noWrap class="subtitle"> 
           <s:textfield name="kt[%{#st.index}].ktfzr" cssStyle="width:80%" theme="simple" id="userlist0" cssClass="input-text-line-readonly"></s:textfield>
           <img src="<%=path %>/images/user.gif" style="cursor: hand;" onclick="addUser(userlist0);return false"/></td>    
    </tr>
    </s:iterator>
   </table>


private List <Zktfzrtj> kt;

public List<Zktfzrtj> getKt() {
return kt;
}

public void setKt(List<Zktfzrtj> kt) {

this.kt = kt;
}

  相关解决方案