You need to sign in to do that
Don't have an account?
Nag22
How to remove and add the items to the list at the same time?
Hi
I am working on one secnario where I need to remove some items from list at the same time I need to add set of items to the list.
Example
list contains 30 items 1,2,3,4,5,6,7.............30
Each item having Yes, no optons like this
1. some question
Yes (radio buttons)
No
If I click on Yes I need to remove 3,4,5 questions
If I click on No I need to remove 7,8 and I have to add 3,4,5 to the list questions as well. (both adding and removing should done at same time)
on every click I am rerendering the page.
Help me to figure out this.
I am working on one secnario where I need to remove some items from list at the same time I need to add set of items to the list.
Example
list contains 30 items 1,2,3,4,5,6,7.............30
Each item having Yes, no optons like this
1. some question
Yes (radio buttons)
No
If I click on Yes I need to remove 3,4,5 questions
If I click on No I need to remove 7,8 and I have to add 3,4,5 to the list questions as well. (both adding and removing should done at same time)
on every click I am rerendering the page.
Help me to figure out this.
One thought here is you could use a wrapper class that has a "selected" boolean, similar to this example: https://developer.salesforce.com/page/Wrapper_Class
WHen you need to operate over the list of 30 items, then you would just count the selected items, for instance.