p:dataTable sortBy not working
<pre><code>&lt;p:dataTable value="#{externalUsersBean.usersList}" var="user" paginator="true" rows="25"&gt;
    &lt;p:column headerText="UID" sortBy="#{user.uid}"&gt;
        &lt;h:outputText value="#{user.uid}"/&gt;
    &lt;/p:column&gt;
    &lt;p:column headerText="Username" sortBy="#{user.username}"&gt;
        &lt;h:outputText value="#{user.username}"/&gt;
    &lt;/p:column&gt;
    ...
    ...
&lt;/p:dataTable&gt;
</code></pre>

<p>I tried changing scope in the bean to ViewScoped, yet not working.
I tried using <code>sortBy="uid"</code>  syntax, yet not working.
I can't understand what I'm doing wrong.</p>