Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Editing Records with List Controllers
You can edit a set of records using list controllers, too. For example, if you create a
page with the following
markup:
you see a page that allows you to update and save the
Stage and Close Date on your
opportunities, like the following:For more information, see Mass Updating Records with a Custom List Controller.
1<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false">
2 <apex:form >
3 <apex:pageBlock >
4 <apex:pageMessages />
5 <apex:pageBlockButtons >
6 <apex:commandButton value="Save" action="{!save}"/>
7 </apex:pageBlockButtons>
8 <apex:pageBlockTable value="{!opportunities}" var="opp">
9 <apex:column value="{!opp.name}"/>
10 <apex:column headerValue="Stage">
11 <apex:inputField value="{!opp.stageName}"/>
12 </apex:column>
13 <apex:column headerValue="Close Date">
14 <apex:inputField value="{!opp.closeDate}"/>
15 </apex:column>
16 </apex:pageBlockTable>
17 </apex:pageBlock>
18 </apex:form>
19</apex:page>