1

Using apex:repeat Tag how to get All Contact Records in visualforce page .I have to achieve this without using apex:pageBlockTable and Standard Set Controller..

3

You can do this with with standardController with recordSetVar as below.

As per Salesforce documentation:

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.

The recordSetVar attribute not only indicates that the page uses a list controller, it can indicates the variable name of the record collection. This variable can be used to access data in the record collection.

<apex:page standardController="Contact" recordSetVar="contacts">
    <ol>
        <apex:repeat var="c" value="{!contacts}">
            <li>
                {!c.name}
            </li>
        </apex:repeat>
    </ol>
</apex:page>

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_associate.htm

| improve this answer | |
  • He said without using Standard Set Controller.. – Pranay Jaiswal Jun 17 '16 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.