Previous Section  < Day Day Up >  Next Section

D.8 Package javax.faces.render

Renderer

See Appendix C for a description of this class.

RenderKit

An instance of a subclass of this abstract class represents a collection of Renderer instances for a specific rendering language, e.g., a markup language like HTML or WML, and is a provider of a ResponseStateManager responsible for encoding view state in a response as well as for configured ResponseStream and ResponseWriter instances.

Synopsis

Class name:

javax.faces.render.RenderKit

Extends:

None

Implements:

None

Constructors


public RenderKit()

Creates an instance.

Methods


public abstract void addRenderer(String family, String rendererType, javax.faces.render.Renderer renderer)

Adds the provided Renderer instance mapped to the specified family and renderer type combination.


public abstract javax.faces.context.ResponseStream createResponseStream(java.io.OutputStream)

Uses the provided stream to create and return a new ResponseStream instance.


public abstract javax.faces.context.ResponseWriter createResponseWriter(java.io.Writer, String contentTypeList, String characterEncoding)

Uses the provided Writer to create and return a new ResponseWriter instance for one of the listed content types (or the default if null) and the specified character encoding.


public abstract javax.faces.render.Renderer getRenderer(String family, String rendererType)

Returns a Renderer instance for the specified family and renderer type combination, or null if none is registered for this combination.


public abstract javax.faces.render.ResponseStateManager getResponseStateManager()

Returns a ResponseStateManager suitable for encoding and decoding client-side view state information for the rendering format supported by this kit.

RenderKitFactory

An instance of a subclass of this abstract class is a factory for a RenderKit instance for a request.

Synopsis

Class name:

javax.faces.render.RenderKitFactory

Extends:

None

Implements:

None

Fields


public static final String HTML_BASIC_RENDER_KIT

The default render kit identifier: HTML_BASIC.

Constructors


public RenderKitFactory()

Creates an instance.

Methods


public abstract void addRenderKit(String renderKitId, javax.faces.render.RenderKit renderKit)

Adds the provided RenderKit instance mapped to the specified ID.


public abstract javax.faces.render.RenderKit getRenderKit(javax.faces.context.FacesContext context, String renderKitId)

Returns a RenderKit instance for the specified ID, possibly customized based on the provided FacesContext (if any).


public abstract java.util.Iterator getRenderKitIds()

Returns an Iterator over the IDs for all available RenderKit instances.

ResponseStateManager

An instance of a subclass of this abstract class is responsible for encoding and decoding client-side view state information for the rendering format supported by a specific render kit.

Synopsis

Class name:

javax.faces.render.ResponseStateManager

Extends:

None

Implements:

None

Constructors


public ResponseStateManager()

Creates an instance.

Methods


public abstract Object getComponentStateToRestore(javax.faces.context.FacesContext context)

Returns an Object representing the component state extracted from the current request or null if not found.


public abstract Object getTreeStructureToRestore(javax.faces.context.FacesContext context, String viewId)

Returns an Object representing the component tree structure for the specified view, extracted from the current request, or null if not found.


public abstract void writeState(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView state)

Writes the current position of the ResponseWriter for the FacesContext, in a format that ensures it's returned with the next request triggered from the view.

    Previous Section  < Day Day Up >  Next Section