[
https://issues.apache.org/jira/browse/TOMAHAWK-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved TOMAHAWK-1482.
--------------------------------------
Fix Version/s: 1.1.10-SNAPSHOT
Resolution: Fixed
I checked the code from jsf 1.1, 1.2 and 2.0 branches and it is true. I
introduced a var to identify when a row was rendered. I also removed a
duplicate call to beforeRow, introduced by MYFACES-1652 on 1.2 and 2.0 branches.
Thanks to Michael Heinen for provide this patch.
> HtmlTableRendererBase produces invalid html if row is not available
> --------------------------------------------------------------------
>
> Key: TOMAHAWK-1482
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1482
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Extended Datatable
> Affects Versions: 1.1.9
> Environment: myfaces 1.2.8, tiles 2.0.7, richfaces 3.3.3.beta1
> Reporter: Michael Heinen
> Assignee: Leonardo Uribe
> Fix For: 1.1.10-SNAPSHOT
>
>
> The class
> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase
> produces invalid html if a row is not available.
> AJAX calls may fail in this case if invalid html is returned.
> See method encodeInnerHtml:
> for(int nr = 0; nr < newspaperRows; nr++){
> ...
> for(int nc = 0; nc < newspaperColumns; nc++) {
> ...
> if(!uiData.isRowAvailable()) {
> log.error("Row is not available. Rowindex = " + currentRow);
> 295 break;
> }
>
> if (nc == 0) {
> ...
> renderRowStart(facesContext, writer, uiData, styles, nr);
> }
> ...
> }
> renderRowEnd(facesContext, writer, uiData);
>
> There is a break in link 295 and the inner loop is left. renderRowStart is
> not called but renderRowEnd is called!
> FIX:
> The call of "renderRowEnd(facesContext, writer, uiData)" must be in the inner
> loop as last statement (1 line before the current position)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.