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
Ratheven SivarajahRatheven Sivarajah 

I am trying to make a visualforce page with the following controller but I am writing it wrong somewhere

Hey Everyone, I am trying to make a visualforce page with the following controller but I am recieveing an error unknown property operation_class.cases on the VF page. Need help. Thank you in advance

public class operations_class{
    list<AccountWrapper> accountWrapperList = new list<AccountWrapper>();
    public String currentRecordId {get;set;}
    public operations_class(){
        Map<Id, AccountWrapper> accountMap = new Map<Id, AccountWrapper>();
        currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
        for(case acc :[SELECT CreatedById, FROM case WHERE id =: currentRecordId ]){
            AccountWrapper accountWrap = accountMap.get(acc.CreatedByID);
            if (null==accountWrap){
                accountWrap = new AccountWrapper();
                accountMap.put(acc.CreatedByID, accountWrap);
        accountWrapperList = accountMap.values();
    public list<AccountWrapper> getAccounts()
        return accountWrapperList;
    public class AccountWrapper
        public Id userId {get; set;}
        public List<case> cases {get; set;}
        public AccountWrapper()
            cases=new List<case>();

<apex:page controller="operations_class">
        <apex:repeat value="{!cases}" var="cas">
                            <apex:outputText value="Name : {!cas.Name}"/>
Sai PraveenSai Praveen (Salesforce Developers) 

Can you confirm what exactly you are trying to achieve using this vf page so can check and let you know the issue here.

Ratheven SivarajahRatheven Sivarajah
Hey Sai thank you for your help. I am doing a Soql on a custom object which is a lookup to a standard object. I want to display the name of the custome object. The SOQL works and I dont where I am making a mistake. I have made some changes please take a look
public class operations_class{
    public List<Case> getNewCases(){
        List<Case> filterList = [SELECT AccountId,CreatedById, FROM case WHERE Id ='50005000005ym2OAAQ' ];
        return filterList;

<apex:page controller="operations_class">
        <apex:pageBlockTable   value="{!filterList}" var="a">        
                <apex:column value="{!}"></apex:column>