2 Replies Latest reply on Sep 13, 2007 11:45 AM by rjstanford

    Sortable columns, the simplest Trinidad way?

    ellenzhao

      I want my data table columns to be sortable. I've read this blog entry:

      http://pmuir.bleepbleep.org.uk/2007/04/backing-trinidads-datatable-with-seam.html

      But to sort the data set in memory is exactly what I want (There are usually 3~6 sortable columns in a single data table in my application. Fetching data set from a remote database on every sorting click sounds like a horror to me. Complexity of heap-sort is O(N log N)....I cache all the frequently used data sets in static fields in an APPLICATION scoped stateless bean.). Trinidad has that feature but I did not find information about how to use it together with Seam. I looked at the SeamDisc example from the latest CVS there are still questions:

      1. Do I have to use ajax4jsf if I only want to use Trinidad's sortable column feature? If not, how should the web.xml, faces-config.xml, and other configuration files look like?

      2. Is there any working example which has only Seam + Trinidad + Facelets together?

      3. Does this Trinidad thing work with JSF RI 1.2 (the latest JSF reference implementation) or do I have to use MyFaces to make it work?


      Any enlightenment would be highly appreciated!

      Regards,
      Ellen

        • 1. Re: Sortable columns, the simplest Trinidad way?
          pmuir

           

          "ellenzhao" wrote:
          1. Do I have to use ajax4jsf if I only want to use Trinidad's sortable column feature? If not, how should the web.xml, faces-config.xml, and other configuration files look like?


          No. Remove the ajax4jsf jar, alter the config parameter that tells it to use Facelets to the correct one for Trinidad.

          2. Is there any working example which has only Seam + Trinidad + Facelets together?


          Not afaik.

          3. Does this Trinidad thing work with JSF RI 1.2 (the latest JSF reference implementation) or do I have to use MyFaces to make it work?


          Yes, this is what the seamdiscs example uses.

          • 2. Re: Sortable columns, the simplest Trinidad way?

            Ellen,

            Did you ever get this working with the simple configuration you were after?

            -Richard