function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Toasty02Toasty02 

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

JimRaeJimRae

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.

TehNrdTehNrd

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

Message Edited by TehNrd on 02-20-2009 03:39 PM