[ 
http://issues.apache.org/jira/browse/MYFACES-278?page=comments#action_12371981 
] 

Gillmer J. Derge commented on MYFACES-278:
------------------------------------------

Hey, you're right.  I thought I had already checked the latest source code 
(1.1.1), but I didn't look at the nightly snapshots or the SVN tree.  That code 
does look fixed.

I downloaded and installed the latest 1.1.3-SNAPSHOT so I could double check 
that with my application.  That's not working yet, but I'm going to assume 
that's a classpath issue where I'm still picking up the old libraries from 
JBoss.  It obviously ought to fix it once I take the time to get it deployed 
properly.

This is good, because the ADF Faces table wasn't really working for me either.  
It fixed this problem but introduced other issues I wasn't happy with (not 
bugs; it just wasn't the perfect substitute for me).

Thanks.


> UIData does not processColumnChildren() if rowCount() returns -1 (for 
> ResultSetDataModel)
> -----------------------------------------------------------------------------------------
>
>          Key: MYFACES-278
>          URL: http://issues.apache.org/jira/browse/MYFACES-278
>      Project: MyFaces Core
>         Type: Bug
>     Versions: 1.1.0
>     Reporter: Ahmed Ashour
>     Assignee: Martin Marinschek
>     Priority: Minor
>      Fix For: 1.1.0

>
> Any code that iterates the rows using getRowCount() would fail, because it 
> might be -1 (for ResultSetDataModel).
> Instead, isRowAvailable() should be used to iterator over the rows, and 
> "break" otherwise.
> E.g. in javax.faces.component.UIData
> private void processColumnChildren(FacesContext context, int processAction) {
>               int first = getFirst();
>               int rows = getRows();
>               int last;
>               if (rows == 0) {
>                       last = getRowCount();
>               } else {
>                       last = first + rows;
>               }
>               for (int rowIndex = first; rowIndex < last; rowIndex++) {
>                       setRowIndex(rowIndex);
>                       if (isRowAvailable()) {
> Should be replaced with 
> private void processColumnChildren(FacesContext context, int processAction) {
>               int first = getFirst();
>               int rows = getRows();
>               int last;
>               if (rows == 0) {
>                       last = getRowCount();
>               } else {
>                       last = first + rows;
>               }
>               for (int rowIndex = first; last==-1 || rowIndex < last; 
> rowIndex++) {
>                       setRowIndex(rowIndex);
>                       if (isRowAvailable()) {
>                       } else
>                               break

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