Wicket
  1. Wicket
  2. WICKET-4142

DataTable generates empty <tbody> --> invalid XHTML strict

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.5.1
    • Fix Version/s: None
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      When the dataset contains 0 rows, an empty <tbody> is generated by DataTable. This is not valid XHTML strict.

      According to XHTML 1.0 Strict:

      • a <table> must at least contain one <tbody> or <tr>
      • a <tbody> must contain at least one <tr>
      • a <tr> must contain at least one <th> or <td>

      I can only think of one possible solution and it's quite ugly: add an "invisible row" (either always, or only when there are 0 rows) just after the opening <tbody> tag in DataTable.html:
      <tr style="display: none;"><td></td></tr>

        Issue Links

          Activity

          Hide
          Martin Grigorov added a comment -

          Duplicate of WICKET-4153 which also contains a possible patch.

          Show
          Martin Grigorov added a comment - Duplicate of WICKET-4153 which also contains a possible patch.

            People

            • Assignee:
              Unassigned
              Reporter:
              Sander Plas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development