2 Replies Latest reply on Aug 21, 2009 6:51 PM by Tomás Pollak

    Question about sorting in dataTable

    Tomás Pollak Newbie

      Hello all,

      I'm new to RichFaces and using Seam for my application. I'm using a datatable to display the results of a query. The query is limited to 100 results, even though more may exist in the database. So my backing bean contains a list of at most 100 objects.

      Now, my requirement is that when the user sorts the table on a column title, the query should be re-run (with the corresponding 'order by' clause) and the new results should be displayed.

      I've read through the documentation and it seems that there is no direct way to do it using the column sortBy attributes, there's no way to notify my bean to re-run the query. Do you know how this use case can be implemented? How can I bind the column click event to a bean action method?

      Thanks in advance,
      Tomas