多条数据提交

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

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

 

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

分类: ssh知识积累

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

在做主从表提交时常涉及到字表的多条数据同时提交。而如何解决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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值