SlideShare a Scribd company logo
Chapter 6
Standard List Controllers
Mohammed S. A. Kwaik
26/8/2013
msabukwaik@gmil.com
www.facebook.com/msabukwaik
Associating a Standard List Controller with a
Visualforce Page
• Using a standard list controller is very similar to using a standard
controller. First you set the standardController attribute on the
<apex:page> component, then you set the recordSetVar attribute on
the same component.
• For example, to associate a page with the standard list controller for
accounts, use the following markup:
• The recordSetVar attribute not only indicates that the page uses a list
controller, it can indicates the variable name of therecord collection.
This variable can be used to access data in the record collection.
Accessing Data with List Controllers
• Note: This page does not specify a filter in the request, so the page is displayed
with the last used filter.
• 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.
Accessing Data with List Controllers
Using Standard List 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:
• <apex:commandButton> creates a button that calls an action
• <apex:commandLink> creates a link that calls an action
• <apex:actionPoller> periodically calls an action
• <apex:actionSupport> makes an event (such as “onclick”, “onmouseover”,
and so on) on another, named component, call an action
• <apex:actionFunction> defines a new JavaScript function that calls an action
• <apex:page> calls an action when the page is loaded
Using Standard List Controller Actions
• The following table describes the action methods that are supported
by all standard list controllers. You can associate these actions with
any Visualforce component that includes an action attribute.
Action Description
save Inserts new records or updates existing records that have been changed. After this
operation is finished, the save action returns the user to the original page, if known, or
the home page.
quicksave Inserts new records or updates existing records that have been changed. Unlike the
save action, quicksave does not redirect the user to another page.
list Returns a PageReference object of the standard list page, based on the most recently
used list filter for that object when the filterId is not specified by the user.
cancel Aborts an edit operation. After this operation is finished, the cancel action returns the
user to the page where the user originally invoked the edit.
Using Standard List Controller Actions
Action Description
first Displays the first page of records in the set.
last Displays the last page of records in the set.
next Displays the next page of records in the set.
previous Displays the previous page of records in the set.
Using Standard List Controller Actions
Pagination with a List Controller
Using List Views with Standard List Controllers
Using List Views with Standard List Controllers
Using List Views with Standard List Controllers
Editing Records with List Controllers
Editing Records with List Controllers

More Related Content

What's hot

ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
Fioriela Bego
 
Connect your SharePoint forms to external sources
Connect your SharePoint forms to external sourcesConnect your SharePoint forms to external sources
Connect your SharePoint forms to external sources
Nimrod Geva
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
Amelina Ahmeti
 
Less07 2 e_testermodule_6
Less07 2 e_testermodule_6Less07 2 e_testermodule_6
Less07 2 e_testermodule_6Suresh Mishra
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
Mohammed Safwat Abu Kwaik
 
Oracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different SourcesOracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different Sources
Sekhar Byna
 
Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3
Suresh Mishra
 
Oracle BI Publsiher Using Data Template
Oracle BI Publsiher Using Data TemplateOracle BI Publsiher Using Data Template
Oracle BI Publsiher Using Data Template
Edi Yanto
 
Asp.net html server control
Asp.net html  server controlAsp.net html  server control
Asp.net html server control
Sireesh K
 
Less09 2 e_testermodule_8
Less09 2 e_testermodule_8Less09 2 e_testermodule_8
Less09 2 e_testermodule_8
Suresh Mishra
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design document
adivasoft
 
ASP.NET User Controls - 20090828
ASP.NET User Controls - 20090828ASP.NET User Controls - 20090828
ASP.NET User Controls - 20090828Viral Patel
 
Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4
Suresh Mishra
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1
Suresh Mishra
 
Xml Publisher
Xml PublisherXml Publisher
Xml Publisher
Duncan Davies
 
Less02 2 e_testermodule_1
Less02 2 e_testermodule_1Less02 2 e_testermodule_1
Less02 2 e_testermodule_1Suresh Mishra
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
Jignesh Aakoliya
 

What's hot (20)

ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
 
Connect your SharePoint forms to external sources
Connect your SharePoint forms to external sourcesConnect your SharePoint forms to external sources
Connect your SharePoint forms to external sources
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
 
Less07 2 e_testermodule_6
Less07 2 e_testermodule_6Less07 2 e_testermodule_6
Less07 2 e_testermodule_6
 
Asp.net controls
Asp.net controlsAsp.net controls
Asp.net controls
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Oracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different SourcesOracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different Sources
 
Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3
 
Oracle BI Publsiher Using Data Template
Oracle BI Publsiher Using Data TemplateOracle BI Publsiher Using Data Template
Oracle BI Publsiher Using Data Template
 
Asp.net html server control
Asp.net html  server controlAsp.net html  server control
Asp.net html server control
 
Less09 2 e_testermodule_8
Less09 2 e_testermodule_8Less09 2 e_testermodule_8
Less09 2 e_testermodule_8
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design document
 
ASP.NET User Controls - 20090828
ASP.NET User Controls - 20090828ASP.NET User Controls - 20090828
ASP.NET User Controls - 20090828
 
Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1
 
Xml Publisher
Xml PublisherXml Publisher
Xml Publisher
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Less02 2 e_testermodule_1
Less02 2 e_testermodule_1Less02 2 e_testermodule_1
Less02 2 e_testermodule_1
 
Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 

Similar to Standard List Controllers

Standard Controllers
Standard Controllers Standard Controllers
Standard Controllers
Mohammed Safwat Abu Kwaik
 
SFDC UI - Introduction to Visualforce
SFDC UI -  Introduction to VisualforceSFDC UI -  Introduction to Visualforce
SFDC UI - Introduction to Visualforce
Sujit Kumar
 
Asp PPT (.NET )
Asp PPT (.NET )Asp PPT (.NET )
Asp PPT (.NET )
Ankit Gupta
 
Chapter12 (1)
Chapter12 (1)Chapter12 (1)
Chapter12 (1)
Rajalaxmi Pattanaik
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle eventsTrushant parkar
 
Managing state in asp.net
Managing state in asp.netManaging state in asp.net
Managing state in asp.net
Sireesh K
 
SFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSFDC UI - Advanced Visualforce
SFDC UI - Advanced Visualforce
Sujit Kumar
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)
Katy Slemon
 
Web controls
Web controlsWeb controls
Web controls
Sarthak Varshney
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
parallelminder
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
PEGA Activity and Its Methods
PEGA Activity and Its MethodsPEGA Activity and Its Methods
PEGA Activity and Its Methods
SwathiDuvvala
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
Testing Two-Way Data Binding in AngularJS
Testing Two-Way Data Binding in AngularJSTesting Two-Way Data Binding in AngularJS
Testing Two-Way Data Binding in AngularJS
Backand Cohen
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
university of Gujrat, pakistan
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan
 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptx
NavneetKumar111924
 
ABPerformance Quick Tour
ABPerformance Quick TourABPerformance Quick Tour
ABPerformance Quick TourActive Base
 
Data controls ppt
Data controls pptData controls ppt
Data controls pptIblesoft
 
Asp.net
Asp.netAsp.net

Similar to Standard List Controllers (20)

Standard Controllers
Standard Controllers Standard Controllers
Standard Controllers
 
SFDC UI - Introduction to Visualforce
SFDC UI -  Introduction to VisualforceSFDC UI -  Introduction to Visualforce
SFDC UI - Introduction to Visualforce
 
Asp PPT (.NET )
Asp PPT (.NET )Asp PPT (.NET )
Asp PPT (.NET )
 
Chapter12 (1)
Chapter12 (1)Chapter12 (1)
Chapter12 (1)
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle events
 
Managing state in asp.net
Managing state in asp.netManaging state in asp.net
Managing state in asp.net
 
SFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSFDC UI - Advanced Visualforce
SFDC UI - Advanced Visualforce
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)
 
Web controls
Web controlsWeb controls
Web controls
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
PEGA Activity and Its Methods
PEGA Activity and Its MethodsPEGA Activity and Its Methods
PEGA Activity and Its Methods
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Testing Two-Way Data Binding in AngularJS
Testing Two-Way Data Binding in AngularJSTesting Two-Way Data Binding in AngularJS
Testing Two-Way Data Binding in AngularJS
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptx
 
ABPerformance Quick Tour
ABPerformance Quick TourABPerformance Quick Tour
ABPerformance Quick Tour
 
Data controls ppt
Data controls pptData controls ppt
Data controls ppt
 
Asp.net
Asp.netAsp.net
Asp.net
 

Recently uploaded

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 

Recently uploaded (20)

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 

Standard List Controllers

  • 1. Chapter 6 Standard List Controllers Mohammed S. A. Kwaik 26/8/2013 msabukwaik@gmil.com www.facebook.com/msabukwaik
  • 2. Associating a Standard List Controller with a Visualforce Page • Using a standard list controller is very similar to using a standard controller. First you set the standardController attribute on the <apex:page> component, then you set the recordSetVar attribute on the same component. • For example, to associate a page with the standard list controller for accounts, use the following markup: • The recordSetVar attribute not only indicates that the page uses a list controller, it can indicates the variable name of therecord collection. This variable can be used to access data in the record collection.
  • 3. Accessing Data with List Controllers • Note: This page does not specify a filter in the request, so the page is displayed with the last used filter. • 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.
  • 4. Accessing Data with List Controllers
  • 5. Using Standard List 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: • <apex:commandButton> creates a button that calls an action • <apex:commandLink> creates a link that calls an action • <apex:actionPoller> periodically calls an action • <apex:actionSupport> makes an event (such as “onclick”, “onmouseover”, and so on) on another, named component, call an action • <apex:actionFunction> defines a new JavaScript function that calls an action • <apex:page> calls an action when the page is loaded
  • 6. Using Standard List Controller Actions • The following table describes the action methods that are supported by all standard list controllers. You can associate these actions with any Visualforce component that includes an action attribute. Action Description save Inserts new records or updates existing records that have been changed. After this operation is finished, the save action returns the user to the original page, if known, or the home page. quicksave Inserts new records or updates existing records that have been changed. Unlike the save action, quicksave does not redirect the user to another page. list Returns a PageReference object of the standard list page, based on the most recently used list filter for that object when the filterId is not specified by the user. cancel Aborts an edit operation. After this operation is finished, the cancel action returns the user to the page where the user originally invoked the edit.
  • 7. Using Standard List Controller Actions Action Description first Displays the first page of records in the set. last Displays the last page of records in the set. next Displays the next page of records in the set. previous Displays the previous page of records in the set.
  • 8. Using Standard List Controller Actions
  • 9. Pagination with a List Controller
  • 10. Using List Views with Standard List Controllers
  • 11. Using List Views with Standard List Controllers
  • 12. Using List Views with Standard List Controllers
  • 13. Editing Records with List Controllers
  • 14. Editing Records with List Controllers

Editor's Notes

  1. <apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false"> <apex:pageBlock > <apex:pageBlockTable value="{!accounts}" var="a"> <apex:column value="{!a.name}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
  2. <apex:page standardController="Account" recordSetVar="accounts"> <apex:form> <apex:selectList value="{!filterid}" size="1"> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> <apex:commandButton value="Go" action="{!list}"/> </apex:form> </apex:page>
  3. <apex:page standardController="Account" recordSetvar="accounts"> <apex:pageBlock title="Viewing Accounts"> <apex:form id="theForm"> <apex:pageBlockSection > <apex:dataList var="a" value="{!accounts}" type="1"> {!a.name} </apex:dataList> </apex:pageBlockSection> <apex:panelGrid columns="2"> <apex:commandLink action="{!previous}">Previous</apex:commandlink> <apex:commandLink action="{!next}">Next</apex:commandlink> </apex:panelGrid> </apex:form> </apex:pageBlock> </apex:page>
  4. <apex:page standardController="Account" recordSetvar="accounts"> <apex:pageBlock title="Viewing Accounts"> <apex:form id="theForm"> <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:selectList> </apex:panelGrid> <apex:pageBlockSection > <apex:dataList var="a" value="{!accounts}" id="list"> {!a.name} </apex:dataList> </apex:pageBlockSection> </apex:form> </apex:pageBlock> </apex:page>
  5. <apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlock > <apex:panelGrid columns="2"> <apex:outputLabel value="View:"/> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="opp_table"/> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> </apex:panelGrid> </apex:pageBlock> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!opportunities}" var="opp" id="opp_table"> <apex:column value="{!opp.name}"/> <apex:column headerValue="Stage"> <apex:inputField value="{!opp.stageName}"/> </apex:column> <apex:column headerValue="Close Date"> <apex:inputField value="{!opp.closeDate}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
  6. <apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!opportunities}" var="opp"> <apex:column value="{!opp.name}"/> <apex:column headerValue="Stage"> <apex:inputField value="{!opp.stageName}"/> </apex:column> <apex:column headerValue="Close Date"> <apex:inputField value="{!opp.closeDate}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>