javax.faces.view

Class ViewMetadata

    • Constructor Detail

      • ViewMetadata

        public ViewMetadata()
    • Method Detail

      • getViewId

        public abstract String getViewId()

        Returns:
        the view ID for which this ViewMetadata instance was created
      • createMetadataView

        public abstract UIViewRoot createMetadataView(FacesContext context)

        Creates a new UIViewRoot containing only view parameter metadata. The processing of building this UIViewRoot with metadata should not cause any events to be published to the application. The implementation must call FacesContext.setProcessingEvents(boolean) passing false as the argument, at the beginning of the method, and pass true to the same method at the end. The implementation must ensure that this happens regardless of ant exceptions that may be thrown.

        Parameters:
        context - the FacesContext for the current request
        Returns:
        a UIViewRoot containing only view parameter metadata (if any)
      • getViewParameters

        public static Collection<UIViewParameter> getViewParameters(UIViewRoot root)

        Utility method to extract view metadata from the provided UIViewRoot.

        Parameters:
        root - the UIViewRoot from which the metadata will be extracted.
        Returns:
        a Collection of UIViewParameter instances. If the view has no metadata, the collection will be empty.
      • getViewActions

        public static Collection<UIViewAction> getViewActions(UIViewRoot root)

        Utility method to extract view metadata from the provided UIViewRoot.

        Parameters:
        root - the UIViewRoot from which the metadata will be extracted.
        Returns:
        a Collection of UIViewAction instances. If the view has no metadata, the collection will be empty.
      • hasMetadata

        public static boolean hasMetadata(UIViewRoot root)

        Utility method to determine if the the provided UIViewRoot has metadata. The default implementation will return true if the provided UIViewRoot has a facet named UIViewRoot.METADATA_FACET_NAME and that facet has children. It will return false otherwise.

        Parameters:
        root - the UIViewRoot from which the metadata will be extracted from
        Returns:
        true if the view has metadata, false otherwise.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/faces/view/ViewMetadata.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com/en/java/, Class ViewMetadata

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.