Activity Forums Salesforce® Discussions What is apex:repeat is used for VisualForce pages in Salesforce?

  • Anuj

    Member
    April 8, 2020 at 1:49 pm

    Hi Deepak,
    An iteration component that allows you to output the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items.
    for example,
    <apex:page controller="repeatCon" id="thePage">
    <apex:repeat value="{!strings}" var="string" id="theRepeat">
    <apex:outputText value="{!string}" id="theValue"/>
    </apex:repeat>
    </apex:page>
    /*** Controller: ***/
    public class repeatCon {
    public String[] getStrings() {
    return new String[]{'ONE','TWO','THREE'};
    }
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos