我想尝试建立一个简单的电网,该电网有一个删除栏,即像电子邮件中通常的电箱一样,由检查箱组成。
用户然后可以打上检查箱,删除新闻,并且可以拿到所有检查记录,逐一删除。
试图找到实现这一目标的途径,但迄今为止仍然令人怀疑。
这些是我所铭记的,每一方面都有自己的执行问题,即:
- How to get the checked row indexes ? Using actionlistener for each toggle on each checkbox ? (but how do i pass the clicked index to the actionlistener ?)
- Or is there a way where i can get all the grid model, and loop the data to find out which one is checked, just like swing ? (but how do i get the grid model in the jsf bean ?)
- Or perhaps i should bind them to a simple list that contains only the checkbox column data ? (but how do i bind each checkbox to the list using indexes ?)
采用主要内容,但我认为,共同未来论坛的解决办法也可适用于原始数据表。
请分享您对这一点的看法!
谢谢!