title: Property not readable on type java.lang.String when using JSF PrimeFaces
body: <p>I am trying to implement lazy loading data in data table using the demo code in the site</p>
  
  <p><a href="http://www.primefaces.org/showcase/ui/datatableLazy.jsf" rel="noreferrer" title="PrimeFaces Lazyloading">PrimeFaces Lazy loading</a></p>
  
  <p>and I am getting the error</p>
  
  <pre><code>javax.el.PropertyNotFoundException: /table.xhtml @14,49 value="#{car.year}": Property 'year' not readable on type java.lang.String
  </code></pre>
  
  <p>Here is my table.xhtml 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:form id="form"&gt;  
  
  &lt;p:dataTable var="car" value="#{tableBean.lazyModel}" paginator="true" rows="10"  
                id="carTable" lazy="true"&gt;  
  
      &lt;p:column headerText="Year" sortBy="year" filterBy="#{car.year}"&gt;  
          &lt;h:outputText value="#{car.year}" /&gt;  
      &lt;/p:column&gt;  
  
      &lt;p:column headerText="Color" sortBy="color" filterBy="#{car.color}"&gt;  
          &lt;h:outputText value="#{car.color}" /&gt;  
      &lt;/p:column&gt;  
  &lt;/p:dataTable&gt;      
  </code></pre>
  
  <p>  </p>
  
  <p></p>
  
  <p>TableBean code</p>
  
  <pre><code>@ManagedBean
  public class TableBean {  
  
  private LazyDataModel&lt;Car&gt; lazyModel;  
  
  private List&lt;Car&gt; cars;
  
  public TableBean() {
      System.out.println("Girish");
      cars = populateRandomCars(50);
      lazyModel = new LazyCarDataModel(cars);
      lazyModel.setRowCount(10);
  }
  
  public LazyDataModel&lt;Car&gt; getLazyModel() {
      return lazyModel;
  }
  
  public void setLazyModel(LazyDataModel&lt;Car&gt; lazyModel) {
      this.lazyModel = lazyModel;
  }
  
  public List&lt;Car&gt; getCars() {
      return cars;
  }
  
  public void setCars(List&lt;Car&gt; cars) {
      this.cars = cars;
  }
  
  private List&lt;Car&gt; populateRandomCars( int size) {
      List&lt;Car&gt; list = new ArrayList&lt;Car&gt;();
      Car car = null;
      for(int i = 0 ; i &lt; size ; i++) {
          car = new Car();
          car.setColor("color "+i);
          car.setYear(""+i);
          list.add(car);  
      }
  
      return list;
  }  
  } 
  </code></pre>
  
  <p>Car code</p>
  
  <pre><code>class Car {
  private String year;
  private String color;
  
  
  
  public String getYear() {
      return year;
  }
  public void setYear(String year) {
      this.year = year;
  }
  public String getColor() {
      return color;
  }
  public void setColor(String color) {
      this.color = color;
  }
  }
  </code></pre>
  
  <p>and LazyCarDataModel code</p>
  
  <pre><code>public class LazyCarDataModel extends LazyDataModel&lt;Car&gt; {  
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  private List&lt;Car&gt; datasource;  
  
  public LazyCarDataModel(List&lt;Car&gt; datasource) {  
      this.datasource = datasource;  
  }  
  
  @Override  
  public Car getRowData(String rowKey) {  
  
      return new Car();  
  }  
  
  @Override  
  public Object getRowKey(Car car) {  
      return car.getYear();  
  }  
  
  @Override  
  public List&lt;Car&gt; load(int first, int pageSize, String sortField, SortOrder sortOrder, Map&lt;String,String&gt; filters) {  
      List&lt;Car&gt; data = new ArrayList&lt;Car&gt;();  
  
      //filter  
      for(Car car : datasource) {  
          boolean match = true;  
  
          for(Iterator&lt;String&gt; it = filters.keySet().iterator(); it.hasNext();) {  
              try {  
                  String filterProperty = it.next();  
                  String filterValue = filters.get(filterProperty);  
                  String fieldValue = String.valueOf(car.getClass().getField(filterProperty).get(car));  
  
                  if(filterValue == null || fieldValue.startsWith(filterValue)) {  
                      match = true;  
                  }  
                  else {  
                      match = false;  
                      break;  
                  }  
              } catch(Exception e) {  
                  match = false;  
              }   
          }  
  
          if(match) {  
              data.add(car);  
          }  
      }  
  
  
      //rowCount  
      int dataSize = data.size();  
      this.setRowCount(dataSize);  
  
      //paginate  
      if(dataSize &gt; pageSize) {  
          try {  
              return data.subList(first, first + pageSize);  
          }  
          catch(IndexOutOfBoundsException e) {  
              return data.subList(first, first + (dataSize % pageSize));  
          }  
      }  
      else {  
          return data;  
      }  
  }  
  } 
  </code></pre>
  
  <p>Please help.</p>
  
  <p>Thanks in advance.</p>