精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
I am having a jsp page which displays values in the database table using tag as follows:
我在使用JSP页面,页面显示数据库表中的值,值用checkbox标签显示,代码如下:
<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? 我想一个复选框添加到每一行。在动作类里,我想获得被点击复选框所在行的ID。有没有办法做到这一点?
Solution 1
解决方案1
Markus is definitely on to something:
马库斯肯定知道方法:
http://struts.apache.org/1.2.9/userGuide/struts-html.html#checkbox
Solution 2
解决方法2
Have you tried this?
您是否尝试过这个?
Solution 3
解决方案3
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.0下CheckBoxList,但我的情况是,当用户选择CheckBoxList时,优先从一个数据库表填充CheckBoxList,而不是保存其它表,但我必须用同样风格显示且编辑,风格比如有入口时间。
Did any one know the advantages and drawbacks of struts 2.0 over previous versions of struts. I mean is struts 2.0 will support all the features which were supported by earlier versions like 1.0, 1.1, 1.2.有人知道Struts 2.0的优点和缺点,和以前版本相比。我的意思是struts2.0将支持这些由早期版本像1.0,1.1,1.2支持的所有功能。
I would have thought that a site specifically for the framework would get you further quicker than here.我本来以为该框架专业网站会让你比这里更多更快。