0

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:pageblockTable>
</apex:outputPanel>
</apex:pageBlock> 

<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}"/>

 </apex:pageBlockTable>
 </apex:outputPanel>
</apex:pageBlock>

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

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

1 Answer 1

1

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; }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .