2 Replies Latest reply on Mar 11, 2008 6:37 AM by Steffen Grimm

    rich:scrollableDataTable shows up, then disappears, help nee

    Steffen Grimm Newbie


      I use a rich:scrollableDataTable with a binding to dynamically create the columns:

      <rich:scrollableDataTable id="myTable"
       value="#{dynamicTableBean.items}" var="item" width="700"
       height="400" rows="40" sortMode="single" />
      <a4j:commandLink value="Update" reRender="myTable"
       action="#{dynamicTableBean.rerenderTable}" />

      public void rerenderTable() {
       HtmlColumn col;
       HtmlOutputText col_header;
       HtmlOutputText col_content;
       // Remove old columns
       List<Object> list = dataTable.getChildren();
       if (!list.isEmpty()) {
       int size = list.size();
       for (int i = 0; i < size; i++) {
       for (String column : selectedColumns) {
       // header
       col_header = new HtmlOutputText();
       // content
       col_content = new HtmlOutputText();
       col_content.setValueBinding("value", createValueBinding("#{item."
       + column + "}"));
       // column
       col = new HtmlColumn();
       col.getFacets().put("header", col_header);

      When I invoke the rerender method, table is correctly displayed for 2 seconds and then disappears. During this 2 seconds CPU is at 100% and I can't do anything. This code perfectly worked with a regular rich:datatable.

      Does anyone knows a solution on this?

      Thanks and cheers