javax.faces.render

Class RenderKitFactory

  • All Implemented Interfaces:
    FacesWrapper<RenderKitFactory>

    public abstract class RenderKitFactory
    extends Object
    implements FacesWrapper<RenderKitFactory>

    RenderKitFactory is a factory object that registers and returns RenderKit instances. Implementations of JavaServer Faces must provide at least a default implementation of RenderKit. Advanced implementations (or external third party libraries) may provide additional RenderKit implementations (keyed by render kit identifiers) for performing different types of rendering for the same components.

    There must be one RenderKitFactory instance per web application that is utilizing JavaServer Faces. This instance can be acquired, in a portable manner, by calling:

       RenderKitFactory factory = (RenderKitFactory)
        FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
     
    • Field Detail

      • HTML_BASIC_RENDER_KIT

        public static final String HTML_BASIC_RENDER_KIT

        The render kit identifier of the default RenderKit instance for this JavaServer Faces implementation.

        See Also:
        Constant Field Values
    • Constructor Detail

      • RenderKitFactory

        public RenderKitFactory()
    • Method Detail

      • getWrapped

        public RenderKitFactory getWrapped()

        If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped. A default implementation is provided that returns null.

        Specified by:
        getWrapped in interface FacesWrapper<RenderKitFactory>
        Since:
        2.0
      • addRenderKit

        public abstract void addRenderKit(String renderKitId,
                                          RenderKit renderKit)

        Register the specified RenderKit instance, associated with the specified renderKitId, to be supported by this RenderKitFactory, replacing any previously registered RenderKit for this identifier.

        Parameters:
        renderKitId - Identifier of the RenderKit to register
        renderKit - RenderKit instance that we are registering
        Throws:
        NullPointerException - if renderKitId or renderKit is null
      • getRenderKit

        public abstract RenderKit getRenderKit(FacesContext context,
                                               String renderKitId)

        Return a RenderKit instance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specified FacesContext, if non-null. If there is no registered RenderKit for the specified identifier, return null. The set of available render kit identifiers is available via the getRenderKitIds() method.

        Parameters:
        context - FacesContext for the request currently being processed, or null if none is available.
        renderKitId - Render kit identifier of the requested RenderKit instance
        Throws:
        IllegalArgumentException - if no RenderKit instance can be returned for the specified identifier
        NullPointerException - if renderKitId is null
      • getRenderKitIds

        public abstract Iterator<String> getRenderKitIds()

        Return an Iterator over the set of render kit identifiers registered with this factory. This set must include the value specified by RenderKitFactory.HTML_BASIC_RENDER_KIT.

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/render/RenderKitFactory.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, RenderKitFactory (Java(TM) EE 7 Specification APIs)

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.