function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jagjitsingh@indivar.comjagjitsingh@indivar.com 

Difference between Standard Controllers & Standard List Controllers

Hi

 

   What is the  Difference between Standard Controllers & Standard List Controllers .

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
SFDC_LearnerSFDC_Learner

Standard Controller always refers : Object (standard /custom).

StandardsetController is an Apex Class. This class has some methods like setpagesize().... etc...

 

A sample  for you:

 

Page:

-------

<apex:page standardController="DataLoadTest__c" recordsetvar="recs" extensions="test">
    <apex:form >
           <apex:pageBlock >
                <apex:pageBlockSection >
                    <apex:pageBlockTable value="{!recs}" var="r">
                        <apex:column headervalue="Name">
                            {!r.Name}
                        </apex:column>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>
                <apex:commandButton value="previous" action="{!previous}"></apex:commandButton>
                <apex:commandButton value="next" action="{!next}"></apex:commandButton>
           </apex:pageBlock>
     </apex:form>
</apex:page>

 

class:

-------

public with sharing class test {
    public test(ApexPages.StandardsetController Controller){
        Controller.setPageSize(2);
    }
  }

 

This page displays only 2 records per page.. This could be possible by calling the method setPagesize(2). This is a method of standardsetcontroller class.