title: How to use a page block table in a visualforce custom components?
body: <p>I want to add a custom VF component to display the batch job details in a pageblock table. However my component aint saving, it says:  Error    Error: Read only property 'c:batchDetailsComponent.BatchJobDetails' 
  Please help.</p>
  
  <p>This is the visualforce component:</p>
  
  <pre><code>    &lt;apex:component controller="BatchOpportunityDetailsExtension"&gt;
          &lt;apex:attribute name="batchJob" type="List" assignTo="{!BatchJobDetails}" description="" /&gt;
              &lt;apex:form &gt;
                  &lt;apex:pageBlock&gt;
                      &lt;apex:pageblockTable value="{!batchJob}" var="batch"&gt;
                          &lt;apex:column value="{!batch.CompletedDate}"/&gt;    
                          &lt;apex:column value="{!batch.JobItemsProcessed}"/&gt;    
                          &lt;apex:column value="{!batch.NumberOfErrors}"/&gt; 
                      &lt;/apex:pageblockTable&gt;  
                  &lt;/apex:pageBlock&gt;
              &lt;/apex:form&gt;
      &lt;/apex:component&gt;
  </code></pre>
  
  <p>VF Page:</p>
  
  <pre><code>    &lt;apex:page standardController="Opportunity_Scheduled_Information__c" 
       extensions="BatchOpportunityDetailsExtension"&gt;
         &lt;c:oppScheduleComponent componentValue="{!batchJob}"/&gt;
      &lt;/apex:page&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>    public class BatchOpportunityDetailsExtension {
  
  public List&lt;AsyncApexJob&gt; batchJobDetails = new List&lt;AsyncApexJob&gt;();    
  public Opportunity_Scheduled_Information__c pageController {get;set;}
  public BatchOpportunityDetailsExtension() {}
  
  public BatchOpportunityDetailsExtension(ApexPages.StandardController controller) {
  controller.addFields(new List&lt;String&gt;{'Total_Amount__c', 'Number_of_Opportunities__c'});
  pageController = (Opportunity_Scheduled_Information__c)controller.getRecord();
  
  BatchJobDetails = [ SELECT id,ApexClassID,CompletedDate,JobType,JobItemsProcessed,NumberOfErrors,MethodName,Status,ExtendedStatus,TotalJobItems FROM AsyncApexJob WHERE ApexClassId='01p7F000000bKIlQAM' LIMIT 50] ;   
  
  }
  
  public List&lt;AsyncApexJob&gt; getBatchJobDetails()
  {
      return BatchJobDetails ;
  }
  }
  </code></pre>