Class ViewMetadataImpl

    • Constructor Detail

      • ViewMetadataImpl

        public ViewMetadataImpl​(String viewId)
    • Method Detail

      • createMetadataView

        public UIViewRoot createMetadataView​(FacesContext context)
        Description copied from class: ViewMetadata

        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.

        Take note a compliant implementation has to ensure that:

        • the new UIViewRoot must be set as the FacesContext's viewRoot before applying the tag handlers, restoring the old FacesContext in a finally block.
        • The contents of the current UIViewRoot's ViewMap must be copied to the ViewMap of the new UIViewRoot before applying the tag handlers.
        • The UIImportConstants must be processed after applying the tag handlers.
        Specified by:
        createMetadataView in class ViewMetadata
        Parameters:
        context - the FacesContext for the current request
        Returns:
        a UIViewRoot containing only view parameter metadata (if any)
        See Also:
        ViewMetadata.createMetadataView(jakarta.faces.context.FacesContext)