You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Tim (JIRA)" <de...@myfaces.apache.org> on 2006/06/22 09:40:30 UTC

[jira] Commented: (TOMAHAWK-466) WARNING: HTML nesting warning on closing tbody: element tr rendered by component

    [ http://issues.apache.org/jira/browse/TOMAHAWK-466?page=comments#action_12417262 ] 

Tim commented on TOMAHAWK-466:
------------------------------

I get this if the datatable has ROWS set and the number of rows to be rendered is less than the number actually avaliable. Since the HtmlTableRendererBase emits the TR before actually calling isRowAvaliable.

HtmlTableRendererBase: 208->215

        if (rows <= 0)
        {
           last = uiData.getRowCount();
        }
        else
        {
           last = first + rows;
        }

should probably be:

last = uiData.getRowCount();
if (rows > 0 && (last > first + rows)) {
   last = first + rows;
}

I extended HtmlTableRenderer and over road the encodeInnerHtml()  to:
   1) call setRows(0) for the last page 
   2) call super.encodeInnerHtml
   3) call setRows(originalRows)


Then changed the default renderer in faces-config.xml:

 <render-kit>
  <renderer>
   <component-family>javax.faces.Data</component-family>
   <renderer-type>org.apache.myfaces.Table</renderer-type>
   <renderer-class>mypackage.HtmlTableRenderer</renderer-class>
  </renderer>
 </render-kit>


> WARNING: HTML nesting warning on closing tbody: element tr rendered by component
> --------------------------------------------------------------------------------
>
>          Key: TOMAHAWK-466
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-466
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Extended Datatable
>     Versions: 1.1.3-SNAPSHOT, 1.1.4-SNAPSHOT
>     Reporter: Julian Ray
>     Priority: Minor

>
> The following message has been showing up in the error logs.
> WARNING: HTML nesting warning on closing tbody: element tr rendered by component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WasteProfileManager.jsp][Class: javax.faces.component.html.HtmlForm,Id: _idJsp1][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp2][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp40][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp50][Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id: dataTable1]} not explicitly closed
> Same on all pages which use extended data table. Just started to show up when upgrading to latest nightly builds.  JSPs are correct and do include all closing brackets (verified).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira