Activity Forums Salesforce® Discussions How to use Apex Repeat with Set Collection in Salesforce?

  • Deepak

    Member
    August 12, 2019 at 2:43 pm

    You can definitely use a Set in a repeat.

    In the Controller. The property and initializing it in the Constructor, for example's sake:

    public with sharing class TestController {
    public Set<String> aset { get; set; }

    public TestController () {
    aset = new Set<String>{'a','b','c'};
    }
    }

    The Visualforce snippet:

    <apex:repeat value="{!aset}" var="a">
    <apex:outputText value="{!a}"/><br/>
    </apex:repeat>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

Video in

Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a