Can anyone explain to me why the readOnly="true"
attribute is not working as expected? I'm attempting to display a list of 5,000 records using an <apex:repeat>
tag, and I'm receiving an error:
Collection size 5,000 exceeds maximum size of 1,000.
Code examples are below, but this should be working, as Salesforce documentation suggests:
the readOnly attribute also increases the maximum number of items in a collection that can be iterated over using components such as
<apex:dataTable>
,<apex:dataList>
, and<apex:repeat>
. This limit increased from 1,000 items to 10,000.
Controller Logic:
public List<Integer> bulkTest {get; set;}
bulkTest = new List<Integer>();
for ( Integer i = 0; i < 5000; i++){
bulkTest.add(i);
}
Visualforce Page:
<apex:page controller="Bulk_Controller" readOnly="true">
<apex:repeat value="{!bulkTest}" var="int" >
<apex:outputText value="{!int}" />
</apex:repeat>
</apex:page>