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
Kranthi Kumar 118Kranthi Kumar 118 

How to add HTML ID attribute to Components inside APEX:REPEAT

Hi All,

How to add Unique ID's to a component defined inside <apex:repeat> 
 
Raj VakatiRaj Vakati
Try like thus
 
<apex:variable value="{!1}" var="rowNum"/>
    <apex:repeat value="{!collection}" var="row" id="theRepeat-{!rowNum}">
        ({!rowNum}){!row}<br/>
        <apex:variable var="rowNum" value="{!rowNum + 1}"/>
    </apex:repeat>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_repeat.htm