[ 
http://issues.apache.org/jira/browse/TOMAHAWK-467?page=comments#action_12422471 
] 
            
Mike Kienenberger commented on TOMAHAWK-467:
--------------------------------------------

Ok.  I'm now seeing this problem as well (don't know how I missed it before).

I think Michael is correct in that this is caused by the combination of 
newspaperTable and dataScroller.

I've been able to reproduce it by having a dataTable with one item, but a rows 
value of 10.

The newspaperRows are computed to be 10 (this is a table with no 
newpaperColumns), and this is how we get to setRowIndex(1) instead of stopping 
at setRowIndex(0).

In the original t:dataTable code, we did this, where rowIndex was iterating 
from first to last.

           uiData.setRowIndex(rowIndex);

           //scrolled past the last row
           if (!uiData.isRowAvailable())
               break;


Michael's suggestion was to use this:

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

I think this is probably the correct fix for the problem.
It will definitely fix non-newspaper tables.    It won't affect newspaper 
tables without scrollers.    I've tried following it through with newspaper 
tables with scrollers and it looks like that should work as well.

I don't have a current checkout of the myfaces code, so if someone else could 
apply Michael's patch, I'd appreciate it.


> SEVERE: Row is not available. Rowindex = 4
> ------------------------------------------
>
>                 Key: TOMAHAWK-467
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-467
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.3-SNAPSHOT, 1.1.4-SNAPSHOT
>            Reporter: Julian Ray
>         Attachments: HtmlTableRendererBase.diff
>
>
> Jun 3, 2006 6:57:57 AM 
> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase 
> encodeInnerHtml
> SEVERE: Row is not available. Rowindex = 4
> The following message has started to show up in logs. Is consistent across 
> all JSPs which use extended datatable. Always references the nth row where n 
> is the number of rows returned from the backing bean. All n rows are 
> displayed.

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