I have implemented this code but still it is giving me error

Collection size 9,301 exceeds maximum size of 1,000.

I have Created List of List but it is giving me this error.

Apex Class

public with sharing class PaginationCon {

   public List<List<Attachment>> FinalList{get;set;}
   public List<Attachment> tempatt{get;set;}
    public List<Attachment> att{get;set;}

    public PaginationCon ()
     att =new List<Attachment>();
     tempatt=new List<Attachment>();
     FinalList=new List<List<Attachment>>();

    for(Attachment a:[select id,Name,BodyLength,CreatedDate,Owner.Name from Attachment])




VisualForce Page

<apex:page sidebar="false" controller="PaginationCon">

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
  <script src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>

  <link href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css" rel="stylesheet"/>

 <script type="text/javascript">

             $(function () {


  <apex:form >
       <table id="example1" class="table table-bordered table-striped">

                <th>Created Date</th>
                <th>Owner Name</th>
                <th>Click To View</th>
                <th>Click To Delete</th>


           <apex:repeat value="{!FinalList}" var="ftlist">
               <apex:repeat value="{!ftlist}" var="a">         
    <td> <apex:outputText value="{!a.Name}"/></td>
    <td> <apex:outputText value="{!a.BodyLength}"/></td>
    <td> <apex:outputText value="{!a.CreatedDate}"/></td>
    <td> <apex:outputText value="{!a.Owner.Name}"/></td>
    <td> <apex:commandLink value="View"/></td>
    <td> <apex:commandLink value="Delete"/></td>



1 Answer 1


Use attribute readonly in apex:page

<apex:page sidebar="false" controller="PaginationCon" readonly="true">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.