You need to sign in to do that
Don't have an account?
inputCheckbox in a table
Can anyone help me with this? I need to display a list of objects to a user and allow the user to select any number of these objects. I then need to process only the selected objects. I found a wiki post that shows exactly how to do this:
http://wiki.apexdevnet.com/index.php/Checkbox_in_DataTable
I copied the code and tweaked it to use one of my custom objects (rather than Account objects), and it works perfectly. However, I don't understand how it is working! Can someone tell me how the a.selected property gets set to true when the user clicks on the corresponding checkbox? I don't see where this is happening!
Thanks,
Carolyn
The wrapper class has a member variable called selected that is set up like a property ( has a {get; set;} )
When you select the checkbox, the setter is called and the selected member for that wrapper object is set to true.
I wrote this wiki entry back in October of 2008, before the one you posted, and I tried to explain in a little more detail how it works:
http://wiki.apexdevnet.com/index.php/Wrapper_Class
-Jason