Sorting is not working in datatable in PrimeFaces. Please suggest.
See below my .xhtml file
The Problem is:
Sorting is done by the at PhaseId.APPLY_REQUEST_VALUES on the list, with the you reload the list at PhaseId.RENDER_RESPONSE and so you lost the sorting.
Solution: use
This will reload the list at PhaseId.RESTORE_VIEW before sorting is done by .
Tested with PrimeFaces Version 3.1.1 and Mojarra 2.1.8