title: Using Apex Repeat to Populate a Visualforce Table
body: <p>It appears that my List is blank, not being passed through with the controller extension or otherwise some problem is causing my table not to populate the anticipated data.  This visualforce page is being loaded from a custom button on a Work Order.</p>
  
  <p>I've tried populating the data by using:
  :ApexPages.CurrentPage().getParameters().get('id')</p>
  
  <p>As well as just hardcoding what I believe is the 'id' as shown in the code example.</p>
  
  <p>The VF Page is as follows:</p>
  
  <pre><code>&lt;apex:page Standardcontroller="WorkOrder" extensions="cWOInvoice1" renderAs="pdf"&gt;
      &lt;apex:form &gt;
  
  ...
  
                &lt;table style="..."&gt;
                    &lt;tbody style="..."&gt;
                    &lt;tr style="display:table-row;"&gt;
                        &lt;th style="..."&gt;Scope of Work&lt;/th&gt;
                        &lt;th style="..."&gt;Trade&lt;/th&gt;
                        &lt;th style="..."&gt;Price&lt;/th&gt;                       
                        &lt;/tr&gt;
                        &lt;apex:repeat value="{!woli}" var="woli"&gt;
                        &lt;tr&gt;
                            &lt;td style = "..."&gt;{!woli.Repair_Product__r.Name}&lt;/td&gt;
                            &lt;td style = "..."&gt;{!woli.Repair_Product__r.Trade__c}&lt;/td&gt;
                            &lt;td style = "..."&gt;${!woli.Item_Price_Roll_Up_Sub__c}&lt;/td&gt;
  
                            &lt;/tr&gt;
                        &lt;/apex:repeat&gt;
  
                    &lt;/tbody&gt;
                &lt;/table&gt;
  ...
          &lt;/body&gt;
  
      &lt;/apex:form&gt;
  
  &lt;/apex:page&gt;
  </code></pre>
  
  <p>The controller looks like this (Again hardcoded workOrderID for bugtesting):</p>
  
  <pre><code>public class cWOInvoice1 {
      public WorkOrderLineItem woli {get;set;}
      public cWOInvoice1(ApexPages.StandardController controller){
          List&lt;WorkOrderLineItem&gt;woli=[SELECT Id, Area__c, Tenant_Responsible__c, WorkOrderId, Repair_Product__r.Name, Repair_Product__r.Bill_Rate_Retail__c, Repair_Product__r.Bill_Rate__c, Repair_Product__r.Trade__c FROM WorkOrderLineItem WHERE WorkOrderId='0WO55000000Cw4LGAS'];
      }
  }
  </code></pre>
  
  <p>I expected the  custom controller to pass through a list of work order line items that apex repeat would then display in the table.  Instead, I get an empty table.</p>