I�m having problems trying to render a selectManyCheckbox from inside dataTable. After a db query I have a Collection of objects wich I render using dataTable, as follows:
this works as expected... but now I need to put some checkBoxes, one for each entry, so the user can choose some of them to delete or one for update for example. With this requirenment in mind I�ve been trying to render a selectManyCheckbos given to each one the pk value from the list... it�s not working...
follows the code I�m trying to use:
any help will be appreciated.... tx in advance... [ June 08, 2005: Message edited by: Marcos Maia ]
Henrique Sousa
Ranch Hand
Joined: Apr 29, 2004
Posts: 92
posted
0
Hi Marcos,
I was trying to do that same thing a few weeks ago. With the help of some old topics, ranchers and Google, I found out that selectManyCheckbox is not such a good choice. From what I see, you want to select some 'linhaSistema' objects, right? The approach that worked for me was to add a selected (boolean) property to 'linhaSistema' and use selectBooleanCheckbox. Then you iterate over the collection again to check which objects were selected when the page is submited. Regards,
Henrique Sousa<br />SCJP 1.4<br /> <br />All men die, not all men really live - Braveheart, 1995
ram gaurav
Ranch Hand
Joined: Mar 29, 2006
Posts: 208
posted
0
Hi
Its right to say that we can use <h:selectBooleanCheckbox /> But i am having the problem that how to generate dynamic ids for every checkbox, bacause it should be there so that we can easily differentiate that which checkbox is selected.