7 Replies Latest reply on Feb 12, 2012 3:13 PM by Roberto Requena

    Problems with ordering "Rich DataTable" (Table Sorting).

    Roberto Requena Newbie


      I have a backing bean in request scope. Which has an attribute List; This contains the data on list of services that are stored in the database.

       

       

      List<Service> services;


      The display show the contents of the list, and I have an option to filter the list of these services.

       


      The problem is that when the content filter and show correctly and if I click on a column with the attribute "sortBy" this I ordered the data correctly, but it loses the filter to be applied.


      For example:

       

      When I load the first time all the data and displays:

       

       

      IdNameDateCompany
      3

      Programming Service

      10/20/2011My Company 1
      1Design Service07/05/2011My Company 1
      2

      Maintenance of Equipment

      01/01/2012Other Company

       

       

      Then for example apply a filter to show only the services you have as a company "My Company 1" it shows me the following:

       

      IdNameDateCompany
      3

      Programming Service

      10/20/2011My Company 1
      1Design Service07/05/2011My Company 1


       

      And if the column "Id" is has the attribute "sortBy" when I click it shows me the following information:

       


      IdNameDateCompany
      1

      Design Service

      07/05/2011
      My Company 1
      2

      Maintenance of Equipment


      01/01/2012
      Other Company
      3

      Programming Service

       

      10/20/2011
      My Company 1


      The data is sorted correctly, but lost the filter to be applied.


      If anyone has an idea what I'm doing wrong.



      thank you very much and sorry for my English,