Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1087

datatable dont renders a detail correct if a UIColumns is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.6
    • 1.1.7
    • Extended Datatable
    • None

    Description

      The detailStamp facet dont use the full size of table because of the colspan-attribute of the detail-table is not not rendered for all dynamic uicolumns.
      Lets say we have a datatable with 3 UIColumn-Elements and 1 UIColumns-Element with 3 more dynamic UIColumns, now the renderer will render a colspan of 4 and not as expected 6.

      To solve this problem we changed the method renderDetailRow(..) (line 147) in HtmlDataTableRenderer as shown below:

      //writer.writeAttribute(HTML.COLSPAN_ATTR,new Integer(uiData.getChildren().size()) ,null);
      int count = 0;
      List<UIComponent> list = uiData.getChildren();
      for (UIComponent component : list) {
      if (component instanceof UIColumns)

      { UIColumns v = (UIColumns) component; count += v.getRowCount(); }

      else

      { count++; }

      }
      writer.writeAttribute(HTML.COLSPAN_ATTR,new Integer(count) ,null);

      Attachments

        1. HtmlTableRenderer.patch
          1 kB
          David Brainard

        Activity

          People

            lu4242 Leonardo Uribe
            comrize Hartmut Kalk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: