Primefaces dynamic columns p:columns sort specific columns
<p>i have a datatable with dynamic columns, defined by a columnModel. The String property links to the correct field (used for value output). The sort String equals the property, but some columns should not be sortable, sort is null or emtpy (tried both) there:</p>

<pre><code>public class ColumnModel {
    private String property;
    private String sort;
    private int width;

    //GETTER
    ...
}
</code></pre>

<p>I use a List of that models to create my dynamic columns. The use of the width is working well:</p>

<pre><code>&lt;p:dataTable value="#{bean.items}" var="item" ... &gt;

    &lt;p:columns value="#{bean.columnModel}" var="column" sortBy="#{column.sort}" width="#{column.width}"&gt;
        ...
    &lt;/p:columns&gt;
&lt;/p:dataTable&gt;
</code></pre>

<p>My Question:
sortBy does not allow a null or an emtpy value. Otherwise i get a parse exception where it says, it cannot parse #{item.}. primefaces seems to add 'item' (my var of the datatable) automatically before the given sortfield.</p>

<p>How can some columns be ignored?</p>

<p>Thanks for your answeres!</p>

<p>Using primefaces 5.0.9 with Wildfly 9.0.2</p>