Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4142

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.5.1
    • None
    • wicket-extensions
    • 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>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oele Sander Plas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: