|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.faces.render.RenderKit
RenderKit represents a collection of
Renderer
instances that, together, know how to render
JavaServer Faces UIComponent
instances for a specific
client. Typically, RenderKit
s 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 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.
Constructor Summary | |
RenderKit()
|
Method Summary | |
abstract void |
addRenderer(java.lang.String family,
java.lang.String rendererType,
javax.faces.render.Renderer renderer)
Register the specified Renderer instance, associated with the
specified component family and rendererType ,
to the set of Renderer s registered with this RenderKit ,
replacing any previously registered Renderer for this
combination of identifiers. |
abstract javax.faces.context.ResponseStream |
createResponseStream(java.io.OutputStream out)
Use the provided OutputStream to create a new
ResponseStream instance. |
abstract javax.faces.context.ResponseWriter |
createResponseWriter(java.io.Writer writer,
java.lang.String contentTypeList,
java.lang.String characterEncoding)
Use the provided Writer to create a new ResponseWriter instance for the specified (optional) content
type, and character encoding. |
abstract javax.faces.render.Renderer |
getRenderer(java.lang.String family,
java.lang.String rendererType)
Return the Renderer instance most recently registered for
the specified component family and
rendererType , if any; otherwise, return
null . |
abstract javax.faces.render.ResponseStateManager |
getResponseStateManager()
Return an instance of ResponseStateManager to handle
rendering technology specific state management decisions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RenderKit()
Method Detail |
public abstract void addRenderer(java.lang.String family, java.lang.String rendererType, javax.faces.render.Renderer renderer)
Register the specified Renderer
instance, associated with the
specified component family
and rendererType
,
to the set of Renderer
s registered with this RenderKit
,
replacing any previously registered Renderer
for this
combination of identifiers.
family
- Component family of the Renderer
to registerrendererType
- Renderer type of the Renderer
to registerrenderer
- Renderer
instance we are registering
java.lang.NullPointerException
- if family
or
rendererType
or renderer
is nullpublic abstract javax.faces.render.Renderer getRenderer(java.lang.String family, java.lang.String rendererType)
Return the Renderer
instance most recently registered for
the specified component family
and
rendererType
, if any; otherwise, return
null
.
family
- Component family of the requested
Renderer
instancerendererType
- Renderer type of the requested
Renderer
instance
java.lang.NullPointerException
- if family
or
rendererType
is null
public abstract javax.faces.render.ResponseStateManager getResponseStateManager()
Return an instance of ResponseStateManager
to handle
rendering technology specific state management decisions.
public abstract javax.faces.context.ResponseWriter createResponseWriter(java.io.Writer writer, java.lang.String contentTypeList, java.lang.String characterEncoding)
Use the provided Writer
to create a new ResponseWriter
instance for the specified (optional) content
type, and character encoding.
Implementors are advised to consult the
getCharacterEncoding()
method of class ServletResponse
to get the required value for the
characterEncoding for this method. Since the Writer
for this response will already have been obtained (due to it
ultimately being passed to this method), we know that the
character encoding cannot change during the rendering of the
response.
writer
- the Writer around which this ResponseWriter
must be built.contentTypeList
- an "Accept header style" list of content
types for this response, or 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
. This will
expand 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.characterEncoding
- such as "ISO-8859-1" for this
ResponseWriter, or null
if the
RenderKit
should choose the best fit. Please see the
IANA for a list of character encodings.
ResponseWriter
.
java.lang.IllegalArgumentException
- if no matching content type
can be found in contentTypeList
, or no matching
character encoding can be found for the argument
characterEncoding
.public abstract javax.faces.context.ResponseStream createResponseStream(java.io.OutputStream out)
Use the provided OutputStream
to create a new
ResponseStream
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |