javax.faces.component.visit

Class VisitContext

    • Field Detail

      • ALL_IDS

        public static final Collection<String> ALL_IDS

        This unmodifiable Collection is returned by getIdsToVisit() and getSubtreeIdsToVisit() in cases where all ids should be visited.

        To simplify logic for visitTree() implementations, this Collection always returns false for isEmpty. All other methods throw UnsupportedOperationException.

        Since:
        2.0
    • Constructor Detail

      • VisitContext

        public VisitContext()
    • Method Detail

      • getFacesContext

        public abstract FacesContext getFacesContext()

        Returns the FacesContext for the current request.

        Since:
        2.0
      • getIdsToVisit

        public abstract Collection<String> getIdsToVisit()

        Returns the ids of the components to visit.

        In the case of a full tree visit, this method returns the ALL_IDS collection. Otherwise, if a partial visit is beign performed, returns a modifiable collection containing the client ids of the components that should be visited.

      • getSubtreeIdsToVisit

        public abstract Collection<String> getSubtreeIdsToVisit(UIComponent component)

        Given a NamingContainer component, returns the client ids of any components underneath the NamingContainer that should be visited.

        This method is called by NamingContainer visitTree() implementations to determine whether the NamingContainer contains components to be visited. In the case where no such components exist, the NamingContainer can short-circuit the tree visit and avoid descending into child subtrees.

        In addition, iterating components such as UIData may be able to use the returned ids to determine which iterated states (ie. rows) need to be visited. This allows the visit traversal to be contstrained such only those rows that contain visit targets need to be traversed.

        Parameters:
        component - a NamingContainer component
        Returns:
        an unmodifiable Collection containing the client ids of any components underneath the NamingContainer that are known to be targets of the tree visit. If no such components exist, returns an empty Collection. If all components underneath the NamingContainer should be visited, returns the VisitContext.ALL_IDS collection.
        Throws:
        IllegalArgumentException - if component is not an instance of NamingContainer
      • invokeVisitCallback

        public abstract VisitResult invokeVisitCallback(UIComponent component,
                                                        VisitCallback callback)

        Called by UIComponent.visitTree() to visit a single component.

        Parameters:
        component - the component to visit
        callback - the VisitCallback to call
        Returns:
        a VisitResult value that indicates whether to continue visiting the component's subtree, skip visiting the component's subtree or abort the visit altogether.
      • getHints

        public abstract Set<VisitHint> getHints()

        Returns hints that influence the behavior of the tree visit.

        Interested parties, such as UIComponent.visitTree() implementations, may check to see whether a particular hint is present by calling VisitContext.getHints().contains(), passing in one of the hints defined by VisitHint.

        Returns:
        a non-empty, unmodifiable collection of VisitHints
      • createVisitContext

        public static VisitContext createVisitContext(FacesContext context)

        Creates a VisitContext instance for use with UIComponent.visitTree(). This method can be used to obtain a VisitContext instance when all components should be visited with the default visit hints.

        Parameters:
        context - the FacesContext for the current request
        Returns:
        a VisitContext instance

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

22/08/2025 07:49:21 Cette version de la page est en cache (à la date du 22/08/2025 07:49:21) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/component/visit/VisitContext.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, VisitContext (Java(TM) EE 7 Specification APIs)

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.