Documentation Version
Winter '16 (API version 35.0)
  • Winter '16 (API version 35.0) 35.0
  • Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English

Accessing Data with List Controllers

Once you have associated a page with a list controller, you can refer to the set of records using expression language syntax. For example, to create a simple table of accounts, create a page with the following markup:
<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
  <apex:pageBlock >
    <apex:pageBlockTable value="{!accounts}" var="a">
      <apex:column value="{!}"/>
This results in a page that lists all the account names in your organization:Result of the example page.


This page does not specify a filter in the request, so the page is displayed with the last used filter. For information on using filters with list controllers, see Using List Views with Standard List Controllers.

As with queries in the API, you can use expression language syntax to retrieve data from related records. As with standard controllers, you can traverse up to five levels of child-to-parent relationships and one level of parent-to-child relationships.

When using a standard list controller, the returned records sort on the first column of data, as defined by the current view, even if that column is not rendered. When using an extension or custom list controller, you can control the sort method.



No more than 10,000 records can be returned by a standard list controller. Custom controllers can work with larger results sets. See Working with Large Sets of Data.