@Override
    protected boolean visitRows(VisitContext context, VisitCallback callback, boolean visitRows) {
        if (!(context instanceof VisitContextImpl)) {
            throw new FacesException();
        }

        boolean requiresColumns = requiresColumns();
        int processed = 0;
        int rowIndex = 0;
        int rows = 0;
        if (visitRows) {
            rowIndex = getFirst() - 1;
            rows = getRows();
        }

        while (true) {
            if (visitRows) {
                if ((rows > 0) && (++processed > rows)) {
                    break;
                }

                setRowIndex(++rowIndex);
                if (!isRowAvailable()) {
                    break;
                }
            }

            if (getChildCount() > 0) {
                for (int i = 0; i < getChildCount(); i++) {
                    UIComponent kid = getChildren().get(i);
                    if (!((VisitContextImpl) context).isRejected(kid)) {
                        if (requiresColumns) {
                            if (kid instanceof Columns) {
                                Columns columns = (Columns) kid;
                                for (int j = 0; j < columns.getRowCount(); j++) {
                                    columns.setRowIndex(j);

                                    boolean value = visitColumnContent(context, callback, columns);
                                    if (value) {
                                        columns.setRowIndex(-1);
                                        return true;
                                    }
                                }

                                columns.setRowIndex(-1);
                            }
                            else {
                                boolean value = visitColumnContent(context, callback, kid);
                                if (value) {
                                    return true;
                                }
                            }
                        }
                        else {
                            if (kid.visitTree(context, callback)) {
                                return true;
                            }
                        }
                    }
                }
            }

            if (!visitRows) {
                break;
            }

        }

        return false;
    }
Enhanced version of the Faces UIData.
primefaces/src/main/java/org/primefaces/component/api/PrimeUIData.java