Inline editing a record from a list
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 ...
Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.