org.apache.shale.validator.faces
Class ValidatorRenderKit

java.lang.Object
  extended by javax.faces.render.RenderKit
      extended by org.apache.shale.validator.faces.ValidatorRenderKit

public class ValidatorRenderKit
extends javax.faces.render.RenderKit

Decorates the original RenderKit passed by the overloaded constructor in the org.apache.shale.view.faces.ViewViewHandler. The majority of the implementation is passed on the the original RenderKit but requests for renderers registered with the "javax.faces.Command" and "javax.faces.Input" families are decorated. Only renderers in the "javax.faces.Command" family of types "javax.faces.Link" and "javax.faces.Button" are considered. These are renderers from the vanilla JSF runtime that have predictable behavior. The wrapper adds special behavior for the CommonsValidator validator and org.apache.shale.component.ValidatorScript component.


Constructor Summary
ValidatorRenderKit(javax.faces.render.RenderKit defaultRenderKit)
          This constructor is overloaded to pass the original RenderKit
 
Method Summary
 void addRenderer(String componentFamily, String rendererType, javax.faces.render.Renderer renderer)
          
 javax.faces.context.ResponseStream createResponseStream(OutputStream outputStream)
          
 javax.faces.context.ResponseWriter createResponseWriter(Writer writer, String contentTypeList, String characterEncoding)
          
 javax.faces.render.Renderer getRenderer(String componentFamily, String rendererType)
          If the component family is not "javax.faces.Command" or "javax.faces.Input", the defaultRenderKit handles the request.
 javax.faces.render.ResponseStateManager getResponseStateManager()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorRenderKit

public ValidatorRenderKit(javax.faces.render.RenderKit defaultRenderKit)

This constructor is overloaded to pass the original RenderKit

.

Parameters:
defaultRenderKit - The default RenderKit that we will be wrapping
Method Detail

addRenderer

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

Specified by:
addRenderer in class javax.faces.render.RenderKit

getRenderer

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

If the component family is not "javax.faces.Command" or "javax.faces.Input", the defaultRenderKit handles the request. If the family is "javax.faces.Command", and the renderer type is "javax.faces.Link" or "javax.faces.Button" the default renderer is decorated with org.apache.shale.renderer.ValidatorCommandRenderer. If the component family is "javax.faces.Input", the default renderer is decorated with org.apache.shale.renderer.ValidatorInputRenderer.

Specified by:
getRenderer in class javax.faces.render.RenderKit
Parameters:
componentFamily - Component family for which to retrieve a Renderer
rendererType - Renderer type for which to retrieve a Renderer

getResponseStateManager

public javax.faces.render.ResponseStateManager getResponseStateManager()

Specified by:
getResponseStateManager in class javax.faces.render.RenderKit

createResponseWriter

public javax.faces.context.ResponseWriter createResponseWriter(Writer writer,
                                                               String contentTypeList,
                                                               String characterEncoding)

Specified by:
createResponseWriter in class javax.faces.render.RenderKit

createResponseStream

public javax.faces.context.ResponseStream createResponseStream(OutputStream outputStream)

Specified by:
createResponseStream in class javax.faces.render.RenderKit


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.