code: @Override
      public boolean visitTree(VisitContext visitContext, 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(visitContext)) {
              return false;
          }
  
          // Clear out the row index is one is set so that
          // we start from a clean slate.
          FacesContext facesContext = visitContext.getFacesContext();
  
          // NOTE: that the visitRows local will be obsolete once the
          // appropriate visit hints have been added to the API
          boolean visitRows = requiresRowIteration(visitContext);
  
          Integer oldRowKey = null;
          if (visitRows) {
              oldRowKey = getRowKey();
              setRowKey(facesContext, null);
          }
  
          // Push ourselves to EL
          pushComponentToEL(facesContext, null);
  
          try {
  
              // Visit ourselves. Note that we delegate to the
              // VisitContext to actually perform the visit.
              VisitResult result = visitContext.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
              if ((result == VisitResult.ACCEPT)) {
                  if (visitDataChildren(visitContext, callback, visitRows)) {
                      return true;
                  }
              }
          } catch (IOException e) {
              // TODO handle exception
              LOG.log(Level.SEVERE, e.getMessage(), e);
          } finally {
  
              // Clean up - pop EL and restore old row index
              popComponentFromEL(facesContext);
  
              if (visitRows) {
                  try {
                      setRowKey(facesContext, oldRowKey);
                      restoreOrigValue(facesContext);
                  } catch (Exception e) {
  
                      // TODO: handle exception
                      LOG.log(Level.SEVERE, e.getMessage(), e);
                  }
              }
          }
  
          // Return false to allow the visit to continue
          return false;
      }
docs: Copied from Richfaces UIDataAdapter#visitTree.