Struts 2复选框标签出现问题 [英] problem with struts 2 checkbox tag

查看:82
本文介绍了Struts 2复选框标签出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个jsp页面,该页面使用< s:iterator xmlns:s =#unknown">在数据库表中显示值.标签如下:

 <   s:iterator      ="     var   =" 法案" <   s:   属性     ="    / > 
         <   s:   属性     ="    / > 
         <   s:   属性     ="    / > 
         <   s:   属性     ="    // > 
<  /s:iterator  >  


我想向每行添加一个复选框.在动作类中,我要获取其复选框已被单击的行的ID.

有什么办法吗?

提前谢谢.
Raneesh

解决方案

Markus肯定适用于某些东西:
http://struts.apache.org/1.2.9/userGuide/struts-html. html#checkbox [ ^ ]

最好的问候
Espen Harlinn


您是否尝试过?


Hi All,

I am having a jsp page which displays values in the database table using <s:iterator xmlns:s="#unknown"> tag as follows:

<s:iterator value="myList" var="bill">
         <s: property value="#bill.billId" />
         <s: property value="#bill.customerName" />
         <s: property value="#bill.amount" />
         <s: property value="#bill.paymentDate" />
</s:iterator>


I want to add a checkbox to each row. In the action class i want to get the id of the row whose checkbox has been clicked.

Is there any way to do this?

Thanks in advance.
Raneesh

解决方案

Markus is definitely on to something:
http://struts.apache.org/1.2.9/userGuide/struts-html.html#checkbox[^]

Best regards
Espen Harlinn


Have you tried this?


I want to use checkboxlist in struts 2.0 but my condition is first we populated the checkboxlist from one database table when user select the checkboxlist than save another database table but i have to view and edit in the same fashion such as entry time


这篇关于Struts 2复选框标签出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆