@Override
    public boolean visitTree(VisitContext context, 
                             VisitCallback callback) {

        // First check to see whether we are visitable.  If not
        // short-circuit out of this subtree, though allow the
        // visit to proceed through to other subtrees.
        if (!isVisitable(context))
            return false;

        FacesContext facesContext = context.getFacesContext();
        // NOTE: that the visitRows local will be obsolete once the
        //       appropriate visit hints have been added to the API
        boolean visitRows = requiresRowIteration(context);

        // Clear out the row index is one is set so that
        // we start from a clean slate.
        int oldRowIndex = -1;
        if (visitRows) {
            oldRowIndex = getRowIndex();
            setRowIndex(-1);
        }

        // Push ourselves to EL
        pushComponentToEL(facesContext, null);

        try {

            // Visit ourselves.  Note that we delegate to the 
            // VisitContext to actually perform the visit.
            VisitResult result = context.invokeVisitCallback(this, callback);

            // If the visit is complete, short-circuit out and end the visit
            if (result == VisitResult.COMPLETE)
                return true;

            // Visit children, short-circuiting as necessary
            // NOTE: that the visitRows parameter will be obsolete once the
            //       appropriate visit hints have been added to the API
            if ((result == VisitResult.ACCEPT) && doVisitChildren(context, visitRows)) {

                // First visit facets
                // NOTE: that the visitRows parameter will be obsolete once the
                //       appropriate visit hints have been added to the API
                if (visitFacets(context, callback, visitRows))
                    return true;

                // Next column facets
                // NOTE: that the visitRows parameter will be obsolete once the
                //       appropriate visit hints have been added to the API
                if (visitColumnsAndColumnFacets(context, callback, visitRows))
                    return true;

                // And finally, visit rows
                // NOTE: that the visitRows parameter will be obsolete once the
                //       appropriate visit hints have been added to the API
                if (visitRows(context, callback, visitRows))
                    return true;
            }
        }
        finally {
            // Clean up - pop EL and restore old row index
            popComponentFromEL(facesContext);
            if (visitRows) {
                setRowIndex(oldRowIndex);
            }
        }

        // Return false to allow the visit to continue
        return false;
    }
<p class="changed_added_2_0"><span
class="changed_modified_2_0_rev_a">Override</span> the behavior
in {@link UIComponent#visitTree} to handle iteration
correctly.</p>

<div class="changed_added_2_0">
<p>If the {@link UIComponent#isVisitable} method of this instance
returns <code>false</code>, take no action and return.</p>
<p>Call {@link UIComponent#pushComponentToEL} and
invoke the visit callback on this <code>UIData</code> instance as
described in {@link UIComponent#visitTree}.  Let the result of
the invoctaion be <em>visitResult</em>.  If <em>visitResult</em>
is {@link VisitResult#COMPLETE}, take no further action and
return <code>true</code>.  Otherwise, determine if we need to
visit our children.  The default implementation calls {@link
VisitContext#getSubtreeIdsToVisit} passing <code>this</code> as
the argument.  If the result of that call is non-empty, let
<em>doVisitChildren</em> be <code>true</code>.  If
<em>doVisitChildren</em> is <code>true</code> and
<em>visitResult</em> is {@link VisitResult#ACCEPT}, take the
following action.</p>
<ul>
	  <li><p>If this component has facets, call {@link
	  UIComponent#getFacets} on this instance and invoke the
	  <code>values()</code> method.  For each
	  <code>UIComponent</code> in the returned <code>Map</code>,
	  call {@link UIComponent#visitTree}.</p></li>
	  <li>
<div class="changed_modified_2_0_rev_a">
 <p>If this component has children, for each 
	  <code>UIColumn</code> child:</p>

   <p>Call {@link VisitContext#invokeVisitCallback} on that 
          <code>UIColumn</code> instance.
   If such a call returns <code>true</code>, terminate visiting and 
          return <code>true</code> from this method.</p>

   <p>If the child <code>UIColumn</code> has facets, call
   {@link UIComponent#visitTree} on each one.</p>

   <p>Take no action on non-<code>UIColumn</code> children.</p>

</div>
</li>

   <li>
<div class="changed_modified_2_0_rev_a">

<p>Save aside the result of a call to {@link
   #getRowIndex}.</p>
   <p>For each child component of this <code>UIData</code> that is
   also an instance of {@link UIColumn}, 
   </p>
	  <p>Iterate over the rows.</p>
</div>
<ul>
	  <li><p>Let <em>rowsToProcess</em> be the return from {@link
	  #getRows}.  </p></li>
	  <li><p>Let <em>rowIndex</em> be the return from {@link
	  #getFirst} - 1.</p></li>
	  <li><p>While the number of rows processed is less than
	  <em>rowsToProcess</em>, take the following actions.</p>
<p>Call {@link #setRowIndex}, passing the current row index.</p>
<p>If {@link #isRowAvailable} returns <code>false</code>, take no
further action and return <code>false</code>.</p>

<p class="changed_modified_2_0_rev_a">Call {@link
UIComponent#visitTree} on each of the children of this
<code>UIColumn</code> instance.</p>
    </li>
</ul>
   </li>
</ul>
<p>Call {@link #popComponentFromEL} and restore the saved row
index with a call to {@link #setRowIndex}.</p>
<p>Return <code>false</code> to allow the visiting to
continue.</p>
</div>

@param context the <code>VisitContext</code> that provides
context for performing the visit.

@param callback the callback to be invoked for each node
encountered in the visit.
@throws NullPointerException if any of the parameters are
<code>null</code>.
primefaces/src/main/java/org/primefaces/component/patch/UIDataPatch.java