Visual force page code:

<apex:page standardController="Account" extensions="Contactextctroller" recordSetVar="lstacc"  setup="false" sidebar="false" showHeader="false">

<apex:pageBlock title="AccountRecords">
<apex:outputPanel layout="block" style="overflow:auto;height:150px">

<apex:pageblockTable value="{!lstacc}" var="acc">
<apex:column value="{!acc.Name}"/>

<Apex:column value="{!acc.Industry}"/>

<apex:column value="{!acc.Phone}"/>

<apex:column value="{!acc.Rating}"/>


<apex:pageBlock title="Extension Example">
   <apex:pageBlock title="Contact Records">
   <apex:pageBlockTable value="{!conList}" var="con">

   <apex:column value="{!con.LastName}"/>

   <apex:column value="{!con.FirstName}"/>

   <apex:column value="{!con.Title}"/>

   <apex:column value="{!con.Phone}"/>



visual force page extension controller class:

public class Contactextctroller {
    List<schema.Contact> conList{set;get;}
    public Contactextctroller(ApexPages.StandardSetController controller) {
    conList = [Select id,FirstName, LastName, Title, phone, birthdate from Contact];

}enter image description here


You seem to have missed marking the property as public, due to that the VF page is unaware of that property. Try adding public access modifier to conList:

public List<schema.Contact> conList { set;get; }

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.