- java.lang.Object
-
- javax.faces.render.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 ofRenderKit
. Advanced implementations (or external third party libraries) may provide additionalRenderKit
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 Summary
Fields Modifier and Type Field and Description static String
HTML_BASIC_RENDER_KIT
The render kit identifier of the defaultRenderKit
instance for this JavaServer Faces implementation.
-
Constructor Summary
Constructors Constructor and Description RenderKitFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract void
addRenderKit(String renderKitId, RenderKit renderKit)
Register the specifiedRenderKit
instance, associated with the specifiedrenderKitId
, to be supported by thisRenderKitFactory
, replacing any previously registeredRenderKit
for this identifier.abstract RenderKit
getRenderKit(FacesContext context, String renderKitId)
Return aRenderKit
instance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specifiedFacesContext
, if non-null
.abstract Iterator<String>
getRenderKitIds()
Return anIterator
over the set of render kit identifiers registered with this factory.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.
-
-
-
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
-
-
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 interfaceFacesWrapper<RenderKitFactory>
- Since:
- 2.0
-
addRenderKit
public abstract void addRenderKit(String renderKitId, RenderKit renderKit)
Register the specified
RenderKit
instance, associated with the specifiedrenderKitId
, to be supported by thisRenderKitFactory
, replacing any previously registeredRenderKit
for this identifier.- Parameters:
renderKitId
- Identifier of theRenderKit
to registerrenderKit
-RenderKit
instance that we are registering- Throws:
NullPointerException
- ifrenderKitId
orrenderKit
isnull
-
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 specifiedFacesContext
, if non-null
. If there is no registeredRenderKit
for the specified identifier, returnnull
. The set of available render kit identifiers is available via thegetRenderKitIds()
method.- Parameters:
context
- FacesContext for the request currently being processed, ornull
if none is available.renderKitId
- Render kit identifier of the requestedRenderKit
instance- Throws:
IllegalArgumentException
- if noRenderKit
instance can be returned for the specified identifierNullPointerException
- ifrenderKitId
isnull
-
-
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
21/08/2025 13:01:23 Cette version de la page est en cache (à la date du 21/08/2025 13:01:23) 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 24/12/2007, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/render/RenderKitFactory.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
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.