25 Sty

Drag and drop rows to reorder your DataTable in Primefaces

primefaces

In Primefaces you can drag&drop your columns using widget Datatable to change order of them, but there is no out-of-the-box action to reorder rows. Code snippets attached below will help you implement such custom functionality.

  1. We need to add some JavaScript (JQuery) in your JSF page to make Datatable sortable and to disable selection mode. Listed below doReorder() method gets the new order of the rows and save to order_q variable: Read More