Top Description Fields Constructors Methods
javax.faces.render

public abstract Class RenderKitFactory

extends Object
implements FacesWrapper<RenderKitFactory>
Class Inheritance
All Implemented Interfaces
javax.faces.FacesWrapper
Known Direct Subclasses
com.sun.faces.renderkit.RenderKitFactoryImpl
Imports
java.util.Iterator, javax.faces.FacesWrapper, javax.faces.context.FacesContext

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);

Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped to access the instance being wrapped.

Field Summary

Modifier and TypeField and Description
public static final String
HTML_BASIC_RENDER_KIT

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

private RenderKitFactory

Constructor Summary

AccessConstructor and Description
public
RenderKitFactory()

Deprecated Use the other constructor taking the implementation being wrapped.
public
RenderKitFactory(RenderKitFactory
The implementation being wrapped.
wrapped
)

If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract void
addRenderKit(String
Identifier of the RenderKit to register
renderKitId
,
RenderKit
RenderKit instance that we are registering
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.

public abstract RenderKit

Returns:

a RenderKit instance
getRenderKit
(FacesContext
FacesContext for the request currently being processed, or null if none is available.
context
,
String
Render kit identifier of the requested RenderKit instance
renderKitId
)

Return a RenderKit instance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specified FacesContext, if non-null.

public abstract Iterator<String>

Returns:

an Iterator over the set of render kit identifiers
getRenderKitIds
()

Return an Iterator over the set of render kit identifiers registered with this factory.

public RenderKitFactory
getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HTML_BASIC_RENDER_KITback to summary
public static final String HTML_BASIC_RENDER_KIT

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

wrappedback to summary
private RenderKitFactory wrapped

Constructor Detail

RenderKitFactoryback to summary
public RenderKitFactory()

Deprecated

Use the other constructor taking the implementation being wrapped.

Annotations
@Deprecated
RenderKitFactoryback to summary
public RenderKitFactory(RenderKitFactory wrapped)

If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The getWrapped() will then return the implementation being wrapped.

Parameters
wrapped:RenderKitFactory

The implementation being wrapped.

Method Detail

addRenderKitback to summary
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:String

Identifier of the RenderKit to register

renderKit:RenderKit

RenderKit instance that we are registering

Exceptions
NullPointerException:
if renderKitId or renderKit is null
getRenderKitback to summary
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

FacesContext for the request currently being processed, or null if none is available.

renderKitId:String

Render kit identifier of the requested RenderKit instance

Returns:RenderKit

a RenderKit instance

Exceptions
IllegalArgumentException:
if no RenderKit instance can be returned for the specified identifier
NullPointerException:
if renderKitId is null
getRenderKitIdsback to summary
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.

Returns:Iterator<String>

an Iterator over the set of render kit identifiers

getWrappedback to summary
public RenderKitFactory getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.

Returns:RenderKitFactory

Doc from javax.faces.FacesWrapper.getWrapped.

the wrapped instance.

Annotations
@Override
Since
2.0