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
Vishal KashyapVishal Kashyap 

Getting Error: Unknown property 'Mailer.Acccon.A'... Here is the below code..

apex code:-

 

public with sharing class Mailer
{
public class Acccon
{
Boolean B=true;
Contact C{get;set;}
Account A{get;set;}

public Acccon(Contact Cpas)
{
C=Cpas;
}
public Acccon(Account Apas)
{
A=Apas;
}
}

public List<Acccon> ACCC{set;get;}
public List<Acccon> getACCC()
{
for(Contact c: [select Id, firstName, Email, Phone from Contact limit 10])
{

ACCC.add(new Acccon(c));
}
for(Account a: [select Name from Account limit 10])
{

ACCC.add(new Acccon(a));
}
return ACCC;
}
}

 

VF page code:-

<apex:page controller="Mailer">
<apex:pageBlock >
<apex:dataTable value="{!ACCC}" var="a">
<apex:column value="{!a.A.name}"/>

</apex:dataTable>
</apex:pageBlock>
</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
WaveOCWaveOC
Try to add "public" to "Contact C{get;set;}" and "Account A{get;set;}" within Acccon class