title: <p:columns> won't render when list-property of object is used
body: <p>I am trying to use <code>&lt;p:columns&gt;</code> but it <strong>renders nothing</strong> when I feed it with a <code>List</code> that is a property of the objects the enclosing <code>&lt;p:dataTable&gt;</code> is iterating over.  </p>
  
  <p>I <strong>can use that list succesfully</strong> in <code>&lt;ui:repeat&gt;</code> or access one of it's entries inside the <code>&lt;p:dataTable&gt;</code> using <code>&lt;p:column&gt;</code>. <code>&lt;p:columns&gt;</code> when a assign the list to a property of the backing bean.<br>
  <strong>But when using the property of the <code>Car</code>-object</strong> nothing is rendered at that place. There is no error message etc.  </p>
  
  <p>The part about <code>Dynamic Columns</code> in the <a href="http://primefaces.googlecode.com/files/primefaces_users_guide_4_0_edtn2.pdf" rel="nofollow">Primefaces 4.0 User Guide</a> confuses me as in the code example <code>cars[colIndex]</code> is used but still the <code>&lt;p:columns&gt;</code> has a value other than <code>cars</code> - I don't how this is supposed to be used.</p>
  
  <p><em>Additional Info:<br>
  I need the list of columns for <code>&lt;p:columns&gt;</code> to be part of the class as I want to reuse the code for several classes with different properties and thus require different columns.</em></p>
  
  <p>the Facelets code:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:head&gt;&lt;/h:head&gt;
  &lt;h:messages /&gt;
  &lt;h:form&gt;
      &lt;!-- works --&gt;
      &lt;ui:repeat value="#{carBean.cars}" var="car"&gt;
          ui:repeat: #{car.features}
      &lt;/ui:repeat&gt;
  
      &lt;p:dataTable value="#{carBean.cars}" var="car"&gt;
  
         &lt;!-- works too --&gt;
         &lt;p:column&gt;
             p:column: #{car.features.get(0)}
         &lt;/p:column&gt;
  
         &lt;!-- works too --&gt;
         &lt;p:columns value="#{carBean.beanFeatures}" var="feature" columnIndexVar="colIndex"&gt;  
              carBean p:columns: #{feature}
         &lt;/p:columns&gt;
  
         &lt;!-- renders nothing --&gt;
         &lt;p:columns value="#{car.features}" var="feature" columnIndexVar="colIndex"&gt;  
              car p:columns: #{feature}
         &lt;/p:columns&gt;
  
      &lt;/p:dataTable&gt;
  
  &lt;/h:form&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the backing bean:  </p>
  
  <pre><code>package myPackage;
  
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.List;
  
  import javax.annotation.PostConstruct;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.ViewScoped;
  
  @ManagedBean
  @ViewScoped
  public class CarBean implements Serializable {
  
      List&lt;Car&gt; cars;
      List&lt;String&gt; beanFeatures;
  
      @PostConstruct
      public void init(){
          cars = new ArrayList&lt;Car&gt;();
          Car car1 = new Car();
          car1.features.add("windows");
          car1.features.add("fridge");
          Car car2 = new Car();
          car2.features.add("wheels");
          car2.features.add("nuclear engine");
          cars.add(car1);
          cars.add(car2);
          beanFeatures = car1.getFeatures();
      }
  
      public List&lt;Car&gt; getCars() {
          return cars;
      }
  
      public void setCars(List&lt;Car&gt; cars) {
          this.cars = cars;
      }
  
      public List&lt;String&gt; getBeanFeatures() {
          return beanFeatures;
      }
  
      public void setBeanFeatures(List&lt;String&gt; beanFeatures) {
          this.beanFeatures = beanFeatures;
      }
  
  }
  </code></pre>
  
  <p>the <code>Car</code> class</p>
  
  <pre><code>package myPackage;
  
  import java.util.ArrayList;
  import java.util.List;
  
  
  public class Car {
  
      List&lt;String&gt; features = new ArrayList&lt;String&gt;();
  
      public List&lt;String&gt; getFeatures() {
          return features;
      }
  
      public void setFeatures(List&lt;String&gt; features) {
          this.features = features;
      }
  
  }
  </code></pre>