docs: protected UIComponent findComponent(FacesContext context) throws JspException
      {
          // 1. If we have previously located this component, return it.
          if (_componentInstance != null)
          {
              return _componentInstance;
          }
  
          // 2. Locate the parent component by looking for a parent UIComponentTag instance,
          // and ask it for its component. If there is no parent UIComponentTag instance,
          // this tag represents the root component, so get it from the current Tree and return it.
          UIComponentClassicTagBase parentTag = getParentUIComponentClassicTagBase(pageContext);
  
          if (parentTag == null)
          {
              // This is the root
              _componentInstance = context.getViewRoot();
  
              // check if the view root is already bound to the tag
              Object alreadyBoundViewRootFlag = _componentInstance.getAttributes().get(BOUND_VIEW_ROOT);
  
              if (alreadyBoundViewRootFlag == null)
              {
                  try
                  {
                      setProperties(_componentInstance);
                  }
                  catch (Throwable e)
                  {
                      throw new JspException(e);
                  }
  
                  if (_id != null)
                  {
                      _componentInstance.setId(_id);
                  }
                  else
                  {
                      _componentInstance.setId(getFacesJspId());
                  }
                  _componentInstance.getAttributes().put(BOUND_VIEW_ROOT, true);
                  _created = true;
  
              }
              else if (hasBinding())
              {
                  setProperties(_componentInstance);
              }
  
              return _componentInstance;
          }
  
          UIComponent parent = parentTag.getComponentInstance();
  
          if (parent == null)
          {
              throw new IllegalStateException("parent is null?");
          }
  
          String facetName = getFacetName();
          if (facetName != null)
          {
              // Facet
              String id = createUniqueId(context, parent);
              _componentInstance = parent.getFacet(facetName);
              if (_componentInstance == null)
              {
                  _componentInstance = createComponent(context, id);
                  _created = true;
                  parent.getFacets().put(facetName, _componentInstance);
              }
              else
              {
                  if (checkFacetNameOnParentExists(parentTag, facetName))
                  {
                      throw new IllegalStateException("facet '" + facetName
                              + "' already has a child associated. current associated _componentInstance id: "
                              + _componentInstance.getClientId(context) + " class: "
                              + _componentInstance.getClass().getName());
                  }
              }
  
              addFacetNameToParentTag(parentTag, facetName);
              return _componentInstance;
          }
  
          // Child
          //
          // Note that setProperties is called only when we create the
          // _componentInstance; on later passes, the attributes defined on the
          // JSP tag are set on this Tag object, but then completely
          // ignored.
  
          String id = createUniqueId(context, parent);
  
          // Warn users that this tag is about to find/steal the UIComponent
          // that has already been created for a sibling tag with the same id value .
          // _childrenAdded is a Set, and we will stomp over a past id when calling
          // addChildIdToParentTag.
          //
          // It would also be reasonable to throw an exception here rather than
          // just issue a warning as this is a pretty serious problem. However the
          // Sun RI just issues a warning...
          if (parentTag._childrenAdded != null && parentTag._childrenAdded.contains(id))
          {
              if (log.isLoggable(Level.WARNING))
              {
                  log.warning("There is more than one JSF tag with an id : " + id);
              }
          }
  
          _componentInstance = findComponent(parent, id);
          if (_componentInstance == null)
          {
              _componentInstance = createComponent(context, id);
              if (id.equals(_componentInstance.getId()) )
              {
              _created = true;
              int index = parentTag.getIndexOfNextChildTag();
              if (index > parent.getChildCount())
              {
                  index = parent.getChildCount();
              }
  
              List<UIComponent> children = parent.getChildren();
              children.add(index, _componentInstance);
          }
              // On weblogic portal using faces-adapter, the id set and the retrieved 
              // one for <netuix:namingContainer> is different. The reason is 
              // this custom solution for integrate jsf changes the id of the parent
              // component to allow the same native portlet to be allocated multiple
              // times in the same page
              else if (null == findComponent(parent,_componentInstance.getId()))
              {
                  _created = true;
                  int index = parentTag.getIndexOfNextChildTag();
                  if (index > parent.getChildCount())
                  {
                      index = parent.getChildCount();
                  }
  
                  List<UIComponent> children = parent.getChildren();
                  children.add(index, _componentInstance);
              }
          }
  
          return _componentInstance;
  
      }