0
Good guys, I have an application in JSF, I would like to know how to sort and disorganize datatable when clicking the column, in this table there are 6 columns and 3 of them I would like to click it sort according to the column clicked?
*demand consultation
You will probably want to use Collection.Sort() on your bean. But you can do this in several ways, below are some examples including sample code for download. This example here should fit better in your demand query case http://uaihebert.com/paginacao-de-datatable-lazy-com-jsf-primefaces/ http://www.mkyong.com/jsf2/jsf-datatable-sorting-example/ http://www.guj.com.br/java/42554-jsf-order-datatable
– Marcelo Bezerra bovino
what exactly would it be
desordenar
? do you want to leave your lines random? what difficulty are you having? could show the relevant part of your code?– Math
SORT: crescent: 123456 decreasing: 654321 DISORDER: 643521
– Johnatan Dantas
The clutter part gets a little complicated using the "sortBy" of the "primefaces". You would have to implement the sorting methods themselves and generate, among the possible values, random lines.
– Cold