title: p:dataTable initial SortBy with dynamic columns
body: <p>I want to sort a table by a default column. I found following example in the documentation:</p>
  
  <pre><code>&lt;p:dataTable var="car" value="#{carBean.cars}" sortBy="model"&gt;
      &lt;p:column sortBy="model" headerText=”Model”&gt;
          &lt;h:outputText value="#{car.model}" /&gt;
      &lt;/p:column&gt;
      &lt;p:column sortBy="year" headerText="Year"&gt;
          &lt;h:outputText value="#{car.year}" /&gt;
      &lt;/p:column&gt;
      ...more columns
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>This works fine for static columns. By default it is sorted by column 'model '. But how does this work with dynamic columns (p:columns)?</p>
  
  <p>If I implement it the same way:</p>
  
  <pre><code>&lt;p:dataTable id="cars" var="car" value="#{dtColumnsView.cars}"
      widgetVar="carsTable"
      filteredValue="#{dtColumnsView.filteredCars}"
      sortBy="#{car.model}"&gt;
  
      &lt;p:columns value="#{dtColumnsView.columns}" var="column"
          columnIndexVar="colIndex" sortBy="#{car[column.property]}"&gt;
  
          &lt;f:facet name="header"&gt;
              &lt;h:outputText value="#{column.header}" /&gt;
          &lt;/f:facet&gt;
  
          &lt;h:outputText value="#{car[column.property]}" /&gt;
      &lt;/p:columns&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>It's sorted correctly, but the style for the sorted column header is not set! if I use <code>sortBy="#{car[column.property]}"</code>, the style for all columns are set and the sort doesn't work. 
  I think the problem is in <code>DataTableRenderer</code> <code>resolveDefaultSortIcon</code> method. The property <code>tableSortByExpression</code> is not the same as <code>columnSortByExpression</code>.</p>
  
  <p>Is this a bug? Any Help or workaround? I am using PrimeFaces 4.0. But I also tested it with 5.1.</p>