Home » Mojarra-2.0.1 » javax » faces » render » [javadoc | source]
abstract public class: RenderKit [javadoc | source]

Direct Known Subclasses:

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 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.

Method from javax.faces.render.RenderKit Summary:
addClientBehaviorRenderer,   addRenderer,   createResponseStream,   createResponseWriter,   getClientBehaviorRenderer,   getClientBehaviorRendererTypes,   getComponentFamilies,   getRenderer,   getRendererTypes,   getResponseStateManager
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.faces.render.RenderKit Detail:
 public  void addClientBehaviorRenderer(String type,
    ClientBehaviorRenderer renderer) 
 abstract public  void addRenderer(String family,
    String rendererType,
    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 public ResponseStream createResponseStream(OutputStream out)

    Use the provided OutputStream to create a new ResponseStream instance.

 abstract public ResponseWriter createResponseWriter(Writer writer,
    String contentTypeList,
    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 javax.servlet.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.

 public ClientBehaviorRenderer getClientBehaviorRenderer(String type) 

    Return the ClientBehaviorRenderer instance most recently registered for the specified type, if any; otherwise, return null.

 public Iterator<String> getClientBehaviorRendererTypes() 
 public Iterator<String> getComponentFamilies() 

    Return an Iterator over the component-family entries supported by this RenderKit instance.

    The default implementation of this method returns an empty Iterator

 abstract public Renderer getRenderer(String family,
    String rendererType)

    Return the Renderer instance most recently registered for the specified component family and rendererType, if any; otherwise, return null.

 public Iterator<String> getRendererTypes(String componentFamily) 

    Return an Iterator over the renderer-type entries for the given component-family.

    If the specified componentFamily is not known to this RenderKit implementation, return an empty Iterator

    The default implementation of this method returns an empty Iterator

 abstract public ResponseStateManager getResponseStateManager()

    Return an instance of ResponseStateManager to handle rendering technology specific state management decisions.