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

DataScroller html rendering bug: duplicate td element for paginator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.1.6
    • None
    • Data Scroller
    • None

    Description

      In the default layout mode (table), the paginator is rendered inside a <td> tag. The result is that a td element is rendered inside another td element, which is invalid HTML code:

      [code]
      <td><td style="font-weight:bold;"><a href="#" onclick="return oamSubmitForm('_idJsp0','_idJsp0:scroll_1idx1',null,[['_idJsp0:scroll_1','idx1']]);" id="_idJsp0:scroll_1idx1">1</a></td>...<td><a href="#" onclick="return oamSubmitForm('_idJsp0','_idJsp0:scroll_1idx9',null,[['_idJsp0:scroll_1','idx9']]);" id="_idJsp0:scroll_1idx9">9</a></td></td><td>
      [/code]

      Fix:
      Line 258-263 of HtmlDataScrollerRenderer.java:

      [code]
      if (scroller.isPaginator())
      {
      writeScrollerElementStart(writer, scroller);
      renderPaginator(facesContext, scroller);
      writeScrollerElementEnd(writer, scroller);
      }
      [/code]

      change to:

      [code]
      if (scroller.isPaginator())
      {
      if (scroller.isListLayout()) writeScrollerElementStart(writer, scroller);
      renderPaginator(facesContext, scroller);
      if (scroller.isListLayout()) writeScrollerElementEnd(writer, scroller);
      }
      [/code]

      Attachments

        1. patch.txt
          1 kB
          Nick Stolwijk

        Activity

          People

            lu4242 Leonardo Uribe
            chinhnt2k3 Chinh Nguyen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: