code: private static UIComponent findComponent(UIComponent base,
                                               String id,
                                               boolean checkId) {
          if (checkId && id.equals(base.getId())) {
              return base;
          }
          // Search through our facets and children
          UIComponent result = null;
          for (Iterator i = base.getFacetsAndChildren(); i.hasNext();) {
              UIComponent kid = (UIComponent) i.next();
              if (!(kid instanceof NamingContainer)) {
                  if (checkId && id.equals(kid.getId())) {
                      result = kid;
                      break;
                  }
                  result = findComponent(kid, id, true);
                  if (result != null) {
                      break;
                  }
              } else if (id.equals(kid.getId())) {
                  result = kid;
                  break;
              }
          }
          return (result);
  
      }
docs: <p>Return the {@link UIComponent} (if any) with the specified
  <code>id</code>, searching recursively starting at the specified
  <code>base</code>, and examining the base component itself, followed
  by examining all the base component's facets and children (unless
  the base component is a {@link NamingContainer}, in which case the
  recursive scan is skipped.</p>
  
  @param base Base {@link UIComponent} from which to search
  @param id   Component identifier to be matched