0
votes

I have a scenario and i ma getting no where:

  1. I am having 20 record and i m using pagination via standartcontroller and my page size is 1. one by one record are displayed on the screen and i am having a list or radio button to select options.

  2. When user select a radio button i am getting its value and fill a map with record,value for some processing.

  3. What i want to do is that when a user hits back button the option he has selected in radio button must be visible there. But its not coz every time i m filling new values in the radiobutton list so old values are not sustained.

What i want is when user hits back button he should be able to see the old radio button selected. How can i achive this:

1.Is there any way to make a radio button list's values be checked through controller. 2.Do I need to use wrapperclass to do this.

Help needed.! Thanks

2
Do you want a radio button that reflects a field in the object or is the radio button independent from the object? - Jagular

2 Answers

0
votes

It will be easier to put this field into object. If you don't have such field in you sObject than I would suggest to create wrapper class in your controller and display list of this wrappers instead of your native sObject.

0
votes

If your radio button field is already part of the object, then there's no need for a wrapper class, but if the radio button doesn't need to be part of the object then use a wrapper class to keep the object simple.

Check out this example of a wrapper class with check boxes.

Wrapper classes don't have to be complex.