Contents
Why do you need a standard list controller?
The standard list controller allows you to create Visualforce pages that can display or act on a set of records. Displaying a list of records is a fundamental behavior of almost all web apps. Visualforce makes it extremely easy to display a list of records of the same type, using just markup, no back-end code.
Which is the standard record controller in Visualforce?
The standard (record) controller makes it easy to get a single record loaded into a variable you can use on a Visualforce page. The standard list controller is similar, except instead of a single record, it loads a list, or collection, of records into the variable.
How does a list controller work in Salesforce?
The standard list controller is similar, except instead of a single record, it loads a list, or collection, of records into the variable. Because you’re dealing with a collection, instead of an individual record, you need to use an iteration component to display them.
What are the attributes of a standard controller?
The standardController attribute sets the object to work with, just like with the standard controller. The recordSetVar sets the name of the variable to be created with the collection of records, here, {! contacts }.
How to access data with a list controller?
In the MyControllerExtension ‘s constructor, make a SOQL request to select the ID and Name from the Account object and limit the first 30 results. Then, define setController.setSelected (records) so that the records are selected on page load. A standard list controller can return up to 10,000 records.
When to use standard controller methods in Salesforce?
Using Standard Controller Actions Action methods perform logic or navigation when a page event occurs, such as when a user clicks a button, or hovers over an area of the page. Action methods can be called from page markup by using {! } notation in the action parameter of one of the following tags: