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

sean schofield updated TOMAHAWK-485:
------------------------------------

         Status: Resolved  (was: Patch Available)
    Fix Version: 1.1.4-SNAPSHOT
     Resolution: Fixed

Patch applied.  Thanks for contributing.

> 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
>      Fix For: 1.1.4-SNAPSHOT
>  Attachments: tomahawk-485.txt
>
> 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

Reply via email to