You need to sign in to do that
Don't have an account?

not displaying 2000 records in visualforce page.
i am getting this error.

<apex:page controller="postalcode" readOnly="true"> <apex:pageblock> <apex:variable value="{!1}" var="rowNum"/> <apex:repeat value="{!post}" var="a" > <apex:outputText value="{!FLOOR(rowNum)}"/>...... <apex:outputtext value="{!a.Postal_code__c}" /><br/> <apex:variable var="rowNum" value="{!rowNum + 1}"/> </apex:repeat> </apex:pageblock> </apex:page> public class postalcode { public list<Postal_codes__c> post{set;get;} public postalcode() { post=[select id,Postal_code__c from Postal_codes__c limit 2000]; } }
To overcome this, you can use nested repeats with a wrapper class. I provided an example below, but haven't tested whether or not it compiles or works correctly, so that's up to you.
It there something, that you might be missing out in this question.
As for the apex:repeat tag, as per documentation (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_readonly_context_pagelevel.htm)
Now even I am confused why Prasanth's code is not working.