首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Struts2标签展示列表

2012-11-14 
Struts2标签显示列表把列表的对象在JSP中展现:ww:iterator valuepeopleList statusstats:propert

Struts2标签显示列表
把列表的对象在JSP中展现:

<ww:iterator value="peopleList" status="stat">    <s:property value="peopleList[#stat.index].id" />    <s:property value="peopleList[#stat.index].name" />    <s:property value="peopleList[#stat.index].age" />    <s:property value="peopleList[#stat.index].height"/> </ww:iterator> 

修改的表单:
 <s:form action="update" method="post" >     <s:iterator value="peopleList" status="stat">         <s:hidden              name="peopleList[%{#stat.index}].id"              value="%{peopleList[#stat.index].id}"/>          <s:textfield label="Name"              name="peopleList[%{#stat.index}].name"              value="%{peopleList[#stat.index].name}"/>          <s:textfield label="Age"              name="peopleList[%{#stat.index}].age"              value="%{peopleList[#stat.index].age}" />          <s:textfield label="Height"              name="peopleList[%{#stat.index}].height"              value="%{peopleList[#stat.index].height}"/>         <br/>     </s:iterator>     <s:submit value="Update"/> </s:form> 




1 楼 liuxinsudi 2008-03-18   能否把你的整个项目贴出来呢?要不然让我拜读一下:liuxinsudi@163.com

热点排行