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

Torsten Krah commented on MYFACES-278:
--------------------------------------

Is this really fixed in 1.1.0 or 1.1.3?
I still get this bug, according to the description above in 1.1.3 version, 
posted some help request on the user list yesterday and today and found this 
report now.

kind regards

Torsten

> 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