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
Amit Jadhav 13Amit Jadhav 13 

Unknown property 'VisualforceArrayList.name' error

Visualforce Page
<apex:page controller="thousandLimit">
    <apex:form>
        <apex:pageBlock >
            <apex:repeat value="{!thousandBlocks}" var="block">
                
            <apex:pageBlockTable value="{!block}" var="c">
               
            <apex:column value="{!c.cases.name}"/>
                            
            </apex:pageBlockTable>
        </apex:repeat>
        </apex:pageBlock>
    </apex:form>
</apex:page>

controller
public class thousandLimit {
 private List<limitWrapper> thousandBlocks = new List<limitWrapper>();
   
    private final integer listLimit;
   
    public thousandLimit()
    {
        listLimit = 1000;
    }
   
    public List<limitWrapper> getthousandBlocks()
    {
        thousandBlocks = new limitWrapper[]{};
       
        integer counter = 0;
        integer loopCount = 0;
        boolean Selected =true;
        List<Account> tmpcase = new List<Account>();
       
        for(Account c:[select id,name from Account])
        {
            if(counter < listLimit)
            {
                tmpcase.add(c);
                counter++;
            }
            else
            {
                loopCount++;
                thousandBlocks.add(new limitWrapper(tmpcase,Selected));
                tmpcase = new List<Account>();
                tmpcase.add(c);
                counter = 0;
            }           
        }
       
        if(thousandBlocks.size() == 0)
        {
            loopCount++;
            thousandBlocks.add(new limitWrapper(tmpcase,Selected));
        }
       
        return thousandBlocks;
    }
   
    public class limitWrapper
    {
        public List<Account> cases {get;set;}
         public boolean Selected {get;set;}
        //public integer blockNumber {get;set;}
        public limitWrapper(List<Account> accs, boolean i)
        {
            cases = accs;
            Selected = i;
        }
       
    }
}
Rounak SharmaRounak Sharma
hi amit,
Can you check with c.cases.name. I am not sure if there is any field called name in cases.
Please let me know if you have any doubt. 
thanks
Amit Jadhav 13Amit Jadhav 13
hey rounak thanks for replying
cases is a name of list<Account> not a object 

thanks 
Amit Jadhav