Class ViewMetadataImpl

java.lang.Object
jakarta.faces.view.ViewMetadata
com.sun.faces.application.view.ViewMetadataImpl

public class ViewMetadataImpl extends ViewMetadata
See Also:
  • Constructor Details

    • ViewMetadataImpl

      public ViewMetadataImpl(String viewId)
  • Method Details

    • getViewId

      public String getViewId()
      Description copied from class: ViewMetadata

      Get the view id

      Specified by:
      getViewId in class ViewMetadata
      Returns:
      the view ID for which this ViewMetadata instance was created
      See Also:
    • 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: