4 Replies Latest reply on Jan 17, 2008 3:59 AM by Alexander Seitz

    Alternative DataTable component ?

    Bashar Abdul Newbie


      We are developing an application using JSF RI 1.2 + Facelets 1.1 + RF 3.1.3. While we like most of components RF provides we are very disappointed with the ScrollableDataTable component (which we use extensively). First there is the infamous rerender bug (http://jira.jboss.com/jira/browse/RF-989?page=all&decorator=printable) which in my opinion makes the component useless in any real-life application. Also the component itself is slow and buggy (especially when loading a large amount of data). Also The DataTable component can't sort headers which I also believe is a very big limitation.

      So my question is if anyone had successfully integrated a different DataTable component with RI successfully and if so what was it and what are the steps to do so ?

      The component we are looking for must have the following requirements :
      - Free
      - Ability to sort headers
      - Good performance
      - Scrollable with fixed headers
      - Ability to rerender
      - And of course integrates with RF.



        • 1. Re: Alternative DataTable component ?
          Florian Marwede Expert

          Let me add: There is a high number of bugs concerning the scrollableDataTable and one RF team member is assigned to all of them. But in JIRA I can't see any effort done to reduce the bugs.

          I'm wondering about that for a couple of weeks. Is Konstantin Mishin on holiday or is something happen what I can't see in JIRA?

          Don't misunderstand me, I don't want to push somebody, it's only a question.

          • 2. Re: Alternative DataTable component ?
            Alexander Seitz Newbie


            I must absolutely agree with what you said. I also spend a lot of time looking for a good datatable component which meets the requirements above. At the moment we ended up using the table of the Apache Trinidad framework. This table has sortable headers, is pageable, fast and you can easily customize its look. You can even back this table with an EntityQuery, so paging and sorting is database backed (look at the seamsiscs example in Seam).

            However, there is one limitation when using Richfaces and Trinidad together: Richfaces (ajax4jsf) and Trinidad use different approaches for ajax requests. If you try to reRender (ajax4jsf) a page fragment containing e.g. a Trinidad table, the style of the table is gone. Maybe there are other side effects for other Trinidad components...



            • 3. Re: Alternative DataTable component ?
              Alexander Seitz Newbie

              Hi again,

              it looks like Richfaces partial page rendering works with Trinidad components. I recently found this hint in the seamdiscs example:

              Trinidad and RichFaces Ajax both provide partial page refresh and submit. For Trinidad PPR to work, it needs to be surrounded by a component which enables PPR. The example uses <tr:panelPartialRoot /> to achieve this:

               <tr:table value="#{artists.dataModel}" var="artist">

              If you want to use RichFaces' partial page refresh with Trinidad components then you'll need to disable Trinidad's compressed style keys:

              • 4. Re: Alternative DataTable component ?
                Alexander Seitz Newbie


                I just realized that for all Trinidad versions > 1.2.1 the parameter to disable the style compression is now in org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION

                If you set this to true, the ajax4jsf reRender works with Trinidad components :-)