{"action":"closed","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/218","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/218/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/218/events","html_url":"https://github.com/primefaces/primefaces/issues/218","id":72691966,"number":218,"title":"Datatable sorting in PF 5.2 fails to mark a default sort column when NOT using EL for fieldname","user":{"login":"akarpavicius","id":12213503,"avatar_url":"https://avatars.githubusercontent.com/u/12213503?v=3","gravatar_id":"","url":"https://api.github.com/users/akarpavicius","html_url":"https://github.com/akarpavicius","followers_url":"https://api.github.com/users/akarpavicius/followers","following_url":"https://api.github.com/users/akarpavicius/following{/other_user}","gists_url":"https://api.github.com/users/akarpavicius/gists{/gist_id}","starred_url":"https://api.github.com/users/akarpavicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarpavicius/subscriptions","organizations_url":"https://api.github.com/users/akarpavicius/orgs","repos_url":"https://api.github.com/users/akarpavicius/repos","events_url":"https://api.github.com/users/akarpavicius/events{/privacy}","received_events_url":"https://api.github.com/users/akarpavicius/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-02T20:15:58Z","updated_at":"2015-05-06T08:51:52Z","closed_at":"2015-05-06T08:51:52Z","body":"Primefaces 5.2 datatable\r\nSorting works fine when using EL expressions to specify column fields as in :\r\n`       <p:dataTable var=\"user\" lazy=\"true\" sortBy=\"#{user.userName}\" ...>`\r\n`            <p:column headerText=\"Username\" sortBy=\"#{user.userName}\"...\r\n`\r\nHowever I can NOT use El expression for a field.\r\nThe only way I found sorting to work without EL expression for a column is:\r\n`        <p:dataTable  var=\"user\" lazy=\"true\".. sortField=\"userName\">`\r\n`            <p:column headerText=\"Username\" sortBy=\"#{null}\" field=\"userName\">`\r\n\r\nThe issue is that username column is not marked as sorted by default, although in sql query I see that sorting is done by username.\r\n\r\nAny reason why you need to specify something in `<p:column sortBy` attribute for column to be sortable as   `<p:column  sortable=\"true\" field=\"userName\"` is not sufficient.\r\n"}}