Class RenderKitFactory
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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
.Return anIterator
over the set of render kit identifiers registered with this factory.If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
-
Field Details
-
HTML_BASIC_RENDER_KIT
The render kit identifier of the default
RenderKit
instance for this JavaServer Faces implementation.- See Also:
-
-
Constructor Details
-
RenderKitFactory
public RenderKitFactory()
-
-
Method Details
-
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
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
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
-
getRenderKitIds
Return an
Iterator
over the set of render kit identifiers registered with this factory. This set must include the value specified byRenderKitFactory.HTML_BASIC_RENDER_KIT
.
-