In the previous recipes, all records in a list have been editable. This works well when the user is expecting to edit a number of records, but is not a great experience for users that predominantly view records. In this situation, it is better to give the user a read-only view of the records and a rapid way to edit a record if required.
In this recipe, we will create a Visualforce page that presents a list of contacts in read-only mode. The user may double-click on any field in order to edit the record details. Any changes to the contact records are stored locally, until the user chooses to save or discard them.
Note
Standard Visualforce markup provides support for inline editing, but this requires each field to be double-clicked to edit individually.
This recipe makes use of a custom controller that must be present before the Visualforce page can be created.