api/src/main/java/jakarta/faces/component/UIForm.java [298:358]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            pushComponentToEL(context.getFacesContext(), this);
            boolean isCachedFacesContext = isCachedFacesContext();
            try
            {
                if (!isCachedFacesContext)
                {
                    setCachedFacesContext(context.getFacesContext());
                }

                if (!isVisitable(context))
                {
                    return false;
                }

                VisitResult res = context.invokeVisitCallback(this, callback);
                switch (res)
                {
                    //we are done nothing has to be processed anymore
                    case COMPLETE:
                        return true;

                    case REJECT:
                        return false;

                    //accept
                    default:
                        // Take advantage of the fact this is a NamingContainer
                        // and we can know if there are ids to visit inside it
                        Collection<String> subtreeIdsToVisit = context.getSubtreeIdsToVisit(this);

                        if (subtreeIdsToVisit != null && !subtreeIdsToVisit.isEmpty())
                        {
                            if (getFacetCount() > 0)
                            {
                                for (UIComponent facet : getFacets().values())
                                {
                                    if (facet.visitTree(context, callback))
                                    {
                                        return true;
                                    }
                                }
                            }
                            for (int i = 0, childCount = getChildCount(); i < childCount; i++)
                            {
                                UIComponent child = getChildren().get(i);
                                if (child.visitTree(context, callback))
                                {
                                    return true;
                                }
                            }
                        }
                        return false;
                }
            }
            finally
            {
                //all components must call popComponentFromEl after visiting is finished
                popComponentFromEL(context.getFacesContext());
                if (!isCachedFacesContext)
                {
                    setCachedFacesContext(null);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



api/src/main/java/jakarta/faces/component/UINamingContainer.java [139:199]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        pushComponentToEL(context.getFacesContext(), this);
        boolean isCachedFacesContext = isCachedFacesContext();
        try
        {
            if (!isCachedFacesContext)
            {
                setCachedFacesContext(context.getFacesContext());
            }

            if (!isVisitable(context))
            {
                return false;
            }

            VisitResult res = context.invokeVisitCallback(this, callback);
            switch (res)
            {
                //we are done nothing has to be processed anymore
                case COMPLETE:
                    return true;

                case REJECT:
                    return false;

                //accept
                default:
                    // Take advantage of the fact this is a NamingContainer
                    // and we can know if there are ids to visit inside it
                    Collection<String> subtreeIdsToVisit = context.getSubtreeIdsToVisit(this);

                    if (subtreeIdsToVisit != null && !subtreeIdsToVisit.isEmpty())
                    {
                        if (getFacetCount() > 0)
                        {
                            for (UIComponent facet : getFacets().values())
                            {
                                if (facet.visitTree(context, callback))
                                {
                                    return true;
                                }
                            }
                        }
                        for (int i = 0, childCount = getChildCount(); i < childCount; i++)
                        {
                            UIComponent child = getChildren().get(i);
                            if (child.visitTree(context, callback))
                            {
                                return true;
                            }
                        }
                    }
                    return false;
            }
        }
        finally
        {
            //all components must call popComponentFromEl after visiting is finished
            popComponentFromEL(context.getFacesContext());
            if (!isCachedFacesContext)
            {
                setCachedFacesContext(null);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



