
I have a visualforce page with standard controller 'contact' and an extension class. This visualforce page appears in a section on each Contacts record page. The page renders several SObject checkboxes.
The issue is when a user clicks the checkbox, the selection is not remembered when the Contacts record page and therefore the VF page section are reloaded. How do I code the VF page so that when the Contact record is opened again, the checkboxes that were checked remain checked?
Please help.
3 réponses
Your VF page controller will have to update the record after the user has made their choice. Without doing that, the 'selection' is just a User Interface indicator. There are several ways for controllers to cause values to be saved. Here is a link to the Visual Force Dev Guide which has great examples and descriptions: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#.CSHID=pages_compref.htm|StartTopic=Content%2Fpages_compref.htm|SkinName=webhelp