DataScroller html rendering bug: duplicate td element for paginator
-------------------------------------------------------------------

                 Key: TOMAHAWK-1058
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1058
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Data Scroller
    Affects Versions: 1.1.6
            Reporter: Chinh Nguyen
            Priority: Minor


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]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to