struts2 标签实战整理
来源:互联网 发布:java做cs 编辑:程序博客网 时间:2024/06/04 18:53
List中存放一个Map,利用<s:iterator/>标签显示例子如下:
其中detailList是List的名字(必须和后台返回的List名字相同),hashMap是其中存放的Map的一个代号。
#hashMap.seat中seat是Map中的key。
- < s:iterator value = "detailList" id = "hashMap" >
- < tr >
- < td > < s:property value = "#hashMap.seat" /> </ td >
- < td > < s:property value = "#hashMap.specialOffer" /> </ td >
- < td > < s:property value = "#hashMap.price" /> </ td >
- < td > < s:property value = "#hashMap.preferentialPrice" /> </ td >
- < td > < s:property value = "#hashMap.returnPoint" /> </ td >
- < td > < s:property value = "#hashMap.remainMoney" /> </ td >
- < td > < s:property value = "#hashMap.direction" /> </ td >
- < td > < s:property value = "#hashMap.releaseMan" /> </ td >
- < td > < input type = "button" value = "订票" > </ input > </ td >
- </ tr >
- </ s:iterator >
[
{cp_url=null, cp_id=1, cp_title=www, cp_content=wwwwwww, cp_pubtime=2011-08-13, cp_author=admin, cp_filename=null},
{cp_url=null, cp_id=2, cp_title=hc, cp_content=hchchc, cp_pubtime=2011-08-18, cp_author=admin, cp_filename=null},
{cp_url=null, cp_id=3, cp_title=zx, cp_content=zxzxzx, cp_pubtime=2011-08-17, cp_author=admin, cp_filename=null},
{cp_url=null, cp_id=4, cp_title=yf, cp_content=yfyfyf, cp_pubtime=2011-08-16, cp_author=admin, cp_filename=null},
{cp_url=null, cp_id=5, cp_title=fys, cp_content=ssssfffsssyyy, cp_pubtime=2011-08-15, cp_author=admin, cp_filename=null}
]
迭代输出<s:iterator value="careerpersonList" status="sta">
<s:property value="#sta.getIndex()+1" />:
<s:iterator>
<s:a url="#">
<span class="colorize">
<s:if test="key=='cp_title'">
<s:property value="value.substring(0,2)"/>
</s:if>
</span>
</s:a>
</s:iterator>
<br />
<hr />
</s:iterator>
<s:iterator value="careerpersonList" status="sta" id="cl">
<s:property value="#cl.cp_title.substring(0,8)" /><br/><hr/>
</s:iterator>
- struts2 标签实战整理
- 整理struts2所有标签
- struts2标签常用整理
- struts2标签整理
- Struts2标签库整理
- Struts2标签库整理【完整】
- Struts2标签库整理【完整】
- Struts2标签库整理【完整】
- Struts2的标签库整理
- Struts2标签库整理【完整】
- Struts2标签库整理【完整】
- SSH实战OA 05:Struts2标签
- struts2笔记整理第四天(项目实战)
- struts2 s:if标签以及 #,%{},%{#} 资料整理
- Struts2标签大全,个人整理struts标签全、struts2标签全集学习
- Struts2 标签使用小结(转帖整理)
- struts2标签
- struts2标签
- 如何连接两台电脑,实现两台电脑的共享
- spring 定时器 表达式 org.springframework.scheduling.quartz.CronTriggerBean
- 谈CSS样式优化
- 服务器及远程登录相关
- nslookup命令用法
- struts2 标签实战整理
- 你能当老板吗《程序员成长路线图:从入门到优秀》成熟篇--节选2
- sqlite入门学习笔记1
- C语言中有关时间的函数汇总
- 如何手动开启Windows远程桌面服务
- mysql mysqladmin: command not found解决方法
- 指针数组和数组指针举例
- Linux服务器性能评估与优化
- 程序员成熟的标志《程序员成长路线图:从入门到优秀》成熟篇--节选3