<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
  <apex:pageBlock >
    <apex:form >
      <apex:panelGrid columns="2">
        <apex:outputLabel value="View:"/>
        <apex:selectList value="{!filterId}" size="1">
          <apex:actionSupport event="onchange" rerender="list"/>
          <apex:selectOptions value="{!listviewoptions}"/>
      <apex:pageBlockTable value="{!accounts}" var="a" id="list">
        <apex:column value="{!a.name}"/>
  • 1
    So what's the problem exactly?
    – Adrian Larson
    Jun 30, 2015 at 0:53
  • If you are asking "Can I use a custom list created in a controller to drive my pageBlockTable', the answer is yes. Jun 30, 2015 at 0:57

1 Answer 1


Yes you can.

List<account> accountList = [SELECT Name FROM Account LIMIT 20];
ApexPages.StandardSetController ssc = new ApexPages.StandardSetController(accountList);

This link could be helpful


Not the answer you're looking for? Browse other questions tagged .