2 Replies Latest reply on Aug 3, 2009 3:15 AM by ilya_shaikovsky

    reRender only table rows

    martind1111

      In my application, I use a rich:dataTable to be report some live statistics. I want to refresh this table every one or two seconds. I am using a4j:poll for to trigger re-rendering of the table. This works great for me, except that in this table, I would also like to have a drop down menu on one of the column header in order to select the data presentation for that column. Because the whole table is re-rendering every one or two seconds, if I add a h:selectMenuOne component, it is very difficult for the end-user to change the selection because the table is constantly reloaded and the user doesn't have time to perform the selection before the drop down menu is redrawn. Is it possible to "freeze" the rendering of the table header in such a way that only the table rows (not the table header) are re-rendered?

      Martin

        • 1. Re: reRender only table rows
          alexsmirnov

          Unfrtunately, that is hard to update table content, especially in the IE that does not support table manipulation by DOM methods and requires direct access to a table model.
          If your table does not change nubber of rows during update, it would be better to update components in table cells. You can use 'ajaxKeys' attribute of <rich:dataTable> component to select rows that contains a new values th reduce response size.
          Otherwise, you can use two enclosing tables, the top one to dispalay headers and other for data values.

          • 2. Re: reRender only table rows
            ilya_shaikovsky

            http://in.relation.to/12032.lace complete sample could be checked out from richfaces-demo at 3.3.x branch.