当前位置: 代码迷 >> Web前端 >> 多条数据交付
  详细解决方案

多条数据交付

热度:84   发布时间:2013-09-04 10:34:09.0
多条数据提交

<div class="iteye-blog-content-contain" style="font-size: 14px"></div>

?《这些年,我们读过的技术经典图书》主题有奖征文????????专访李铁军:从医生到金山首席安全专家的转变??????独一无二的职位:开源社区经理

?

struts2 多行数据同时提交解决方法

分类:?ssh知识积累

?593人阅读?评论(0)?收藏?举报

strutslistactioninput

在做主从表提交时常涉及到字表的多条数据同时提交。而如何解决struts2 其实已经提供了解决方案。

在页面端

<input type="text" name="list[0].name" value="" />

<input type="text" name="list[1].name" value="" />

<input type="text" name="list[2].name" value="" />

在后台action中

private List<TblTable> list = new ArrayList<TblTable>();

加上get set方法后字表提交的数据都会被存进这个list中。

分享到:?

<iframe id="baidu_clb_slot_iframe_117306" style="border-style: initial; border-color: initial; vertical-align: bottom; display: block; border-width: 0px; margin: 0px;" src="about:blank" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="728" height="90"></iframe>
查看评论

??暂无评论

?
?
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立
<iframe id="ad_frm_0" style="overflow-x: hidden; overflow-y: hidden; width: 732px; height: 170px; border-width: 0px;" src="http://blog.csdn.net/common/ad.html?t=5&amp;containerId=ad_bot&amp;frmId=ad_frm_0" frameborder="0" scrolling="no"></iframe>
  相关解决方案