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

How to print the list in VF page


I am trying to print the campaign Member List in VF page but i am getting an error that 
Unknown Property  "Unknown property ''" can anyone please help me
below is my VF page and Controller code

<apex:page StandardController="Campaign"  extensions="CampaignMemController">
    <apex:form >
        <apex:pageBlock title="Campaign Members Details" mode="maindetail">
            <apex:pageBlockSection title="Campaign Members"  id="cm3">
                <apex:pageblocktable value="{!cm}" var="com">
                        <apex:column headerValue="Name">
                            <apex:outputfield value="{!lcom.Id}" />
public with sharing class CampaignMemController {

    public Campaign camp {get; set; }
    list<contact> con = [SELECT id FROM contact];
    list<campaignmember> cmlist = [SELECT id, contactid FROM campaignmember];
    list<contact> conlist = new list<contact>();
     public CampaignMemController(ApexPages.StandardController controller) {
         camp  = (Campaign)controller.getRecord();
    for(campaignmember cm : cmlist)
     for(contact c : con)
             if( == cm.contactid)
//System.debug('All the campaignmemebers under contact ''are'+camList );

What is the error message ?
It's giving me an error that Unknown Property...

I want to print the campaign members in VF page..
For this line, <apex:pageblocktable value="{!cm}" var="com"> 

Use {!cmlist}, instead of {!cm}