RenderKit
represents a collection of Renderer instances that, together,
know how to render JavaServer Faces UIComponent instances for
a specific client. Typically, RenderKits are specialized for
some combination of client device type, markup language, and/or user
Locale. A RenderKit also acts as a Factory for
associated Renderer instances, which perform the actual
rendering process for each component.
A typical JavaServer Faces implementation will configure one or
more RenderKit instances at web application startup. They
are made available through calls to the getRenderKit()
methods of RenderKitFactory. Because RenderKit
instances are shared, they must be implemented in a thread-safe
manner. Due to limitations in the current specification having
multiple RenderKit instances at play in the same
application requires a custom javax.faces.application.ViewHandler instance that is aware of how to
deal with this case. This limitation will be lifted in a future
version of the spec.
The RenderKit instance must also vend a ResponseStateManager instance, which is used in the process of
saving and restoring tree structure and state.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addClientBehaviorRenderer(String
type of the type, ClientBehaviorRenderer ClientBehaviorRenderer to registerClientBehaviorRenderer instance we are registeringRegister the specified |
| public abstract void | addRenderer(String
Component family of the family, String Renderer to registerRenderer type of the rendererType, Renderer Renderer to registerRenderer instance we are registeringRegister the specified |
| public abstract ResponseStream | Returns: the newResponseStreamthe out)OutputStream around which to create the
ResponseStreamUse the provided |
| public abstract ResponseWriter | Returns: a newResponseWriter.the Writer around which this writer, String ResponseWriter
must be built.an "Accept header style" list of content
types for this response, or contentTypeList, String null if the RenderKit
should choose the best fit. As of the current version, the
values accepted by the Standard render-kit for this parameter
include any valid "Accept header style" String that includes the
String text/html,
application/xhtml+xml, application/xml
or text/xml. This may change in a future version.
The RenderKit must support a value for this argument that comes
straight from the Accept HTTP header, and therefore
requires parsing according to the specification of the
Accept header. Please see Section
14.1 of RFC 2616 for the specification of the
Accept header.such as "ISO-8859-1" for this
ResponseWriter, or characterEncoding)null if the
RenderKit should choose the best fit. Please see the
IANA for a list of character encodings.Use the provided |
| public ClientBehaviorRenderer | Returns: theClientBehaviorRenderer instancetype of the requested
type)ClientBehaviorRenderer instanceReturn the |
| public Iterator | |
| public Iterator | Returns: Return anIterator over
the component-family entriesReturn an |
| public abstract Renderer | Returns: theRenderer instanceComponent family of the requested
family, String Renderer instanceRenderer type of the requested
rendererType)Renderer instanceReturn the |
| public Iterator | Returns: anIterator over the renderer-typeone of the members of the
componentFamily)Iterator returned by getComponentFamilies.Return an |
| public abstract ResponseStateManager | Returns: theResponseStateManagerReturn an instance of |
| RenderKit | back to summary |
|---|---|
| public RenderKit() | |
| addClientBehaviorRenderer | back to summary |
|---|---|
| public void addClientBehaviorRenderer(String type, ClientBehaviorRenderer renderer) Register the specified
| |
| addRenderer | back to summary |
|---|---|
| public abstract void addRenderer(String family, String rendererType, Renderer renderer) Register the specified | |
| createResponseStream | back to summary |
|---|---|
| public abstract ResponseStream createResponseStream(OutputStream out) Use the provided
| |
| createResponseWriter | back to summary |
|---|---|
| public abstract ResponseWriter createResponseWriter(Writer writer, String contentTypeList, String characterEncoding) Use the provided Implementors are advised to consult the
| |
| getClientBehaviorRenderer | back to summary |
|---|---|
| public ClientBehaviorRenderer getClientBehaviorRenderer(String type) Return the
| |
| getClientBehaviorRendererTypes | back to summary |
|---|---|
| public Iterator Return an
| |
| getComponentFamilies | back to summary |
|---|---|
| public Iterator Return an
The default implementation of this method returns an empty
| |
| getRenderer | back to summary |
|---|---|
| public abstract Renderer getRenderer(String family, String rendererType) Return the | |
| getRendererTypes | back to summary |
|---|---|
| public Iterator Return an If the specified
The default implementation of this method returns an empty
| |
| getResponseStateManager | back to summary |
|---|---|
| public abstract ResponseStateManager getResponseStateManager() Return an instance of
| |