1 Reply Latest reply on Mar 2, 2011 6:00 AM by Ilya Shaikovsky

    How to go back to default sort order

    Kto ToTaki Newbie

      Hi  Question concern rich:dataTable where data is fetched from the database with default sort order (ORDER BY). dataTable show the data with sortOrder=UNSORTED (default).  Then the user begin to sort data (sortMode=muliple). In the end, he wants to go back to the  default sort order. Is this possible to get this by manipulating by dataTable without retrieving data from database once again ?  Regards Mirek

        • 1. How to go back to default sort order
          Ilya Shaikovsky Master

          dataTable as any other component(any one, it's JSF paradigm and not some RF "feature" ) will call the data on every decode/rendering. So your data model should consider caching the data and getting only needed range on it's own. Simple lists could be passed if them are lightweight and not mapped to db or get from some services. Visit our demos related to DataModel's in order to check how to implement something basic.

           

          So then you will be free to use ajax updates as you need (e.g. update sorting for your case via Ajax) without warying about additional dataModel invocations.