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

[jira] Updated: (TOMAHAWK-485) Extended DataTable renderRowStart called before setRowIndex

     [ http://issues.apache.org/jira/browse/TOMAHAWK-485?page=all ]

Dan Allen updated TOMAHAWK-485:
-------------------------------

    Status: Patch Available  (was: Open)

> Extended DataTable renderRowStart called before setRowIndex
> -----------------------------------------------------------
>
>          Key: TOMAHAWK-485
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-485
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Extended Datatable
>     Versions: 1.1.3-SNAPSHOT
>  Environment: linux, java 5, tomcat 5
>     Reporter: Dan Allen

>
> When the extended HtmlDataTable was merged with the newspaper table code, a bug was introduced that effects the rendering of the row-level attributes (rowIndexVar, rowStyle, rowStyleClass).  The problem is that the renderRowStart is called before the setRowIndex is called, so therefore all of the data available to the expressions in these attributes is uninitialized on the first row, and then always one row behind rendering subsequent rows.
> The following simple example demonstrates the issue:
> <t:dataTable var="item" value="#{bean.items}" rowIndexVar="index" rowId="row#{index}">
>  <h:column>
>  row index: <h:outputText value="#{index}" />; item: <h:outputText value="#{item}" />
>  </h:column>
> </t:dataTable>
> You will see when you render this using tomahawk 1.1.3 that the output is as follows:
> row index: 0; item: child1 (rowId=row)
> row index: 1; item: child2 (rowId=row0)
> The expected values would be that the row id would have the same numerical part as the row index, but as you can see it is off by one.

-- 
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