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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          1d 1h 9m 1 Martin Grigorov 20/Oct/11 15:12
          Martin Grigorov made changes -
          Link This issue is duplicated by WICKET-4153 [ WICKET-4153 ]
          Martin Grigorov made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          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.
          Sander Plas created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development