You need to sign in to do that
Don't have an account?
dai developer
Parameters
Hello,
I have a wrapper, <opportunity opp, boolean selected>
I iterate a list of wrapped opps build like this
checkbox - opportunity A
checkbox - opportunity B
checkbox - opportunity C
How can the controller get the id of the opportunity selected / unselected ?
{var.opp.id} ??
script and apex function params ??
thanks
I have a wrapper, <opportunity opp, boolean selected>
I iterate a list of wrapped opps build like this
checkbox - opportunity A
checkbox - opportunity B
checkbox - opportunity C
How can the controller get the id of the opportunity selected / unselected ?
{var.opp.id} ??
script and apex function params ??
thanks
I would suggest you to maintain one more list for processed records which in turn you can use to comapre and get the selected record for current click.
Process record from current click event and then add it to previously selected list.
Now when you click on new checkbox, check if that record is already in previously selected list and accordingly add it to the cureent selection list.
This will ensure that you will process only one record at a time.
-N.J
All Answers
That´s exactly what I have, but, this gives me 'all' the records checked, what I want to update (or not) is the record just checked / unchcked.
Did I miss anything ?
I would suggest you to maintain one more list for processed records which in turn you can use to comapre and get the selected record for current click.
Process record from current click event and then add it to previously selected list.
Now when you click on new checkbox, check if that record is already in previously selected list and accordingly add it to the cureent selection list.
This will ensure that you will process only one record at a time.
-N.J