Spring Web Flow

org.springframework.faces.ui
Class BaseComponentRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.springframework.faces.ui.BaseComponentRenderer
Direct Known Subclasses:
BaseSpringJavascriptComponentRenderer

public abstract class BaseComponentRenderer
extends javax.faces.render.Renderer

Base Renderer for typical faces components, handling the rendering for common UIComponent attributes.

Author:
Jeremy Grelle

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Fields inherited from class javax.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
 
Constructor Summary
BaseComponentRenderer()
           
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Renders the opening portion of the tag, prior to any children.
 void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Closes the tag after children have been rendered.
protected  java.util.Map getAttributeAliases(javax.faces.component.UIComponent component)
           
protected  java.util.Map getAttributeCallbacks(javax.faces.component.UIComponent component)
           
protected abstract  java.lang.String[] getAttributesToRender(javax.faces.component.UIComponent component)
           
protected abstract  java.lang.String getRenderedTagName(javax.faces.component.UIComponent component)
           
protected  void writeAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Writes the attributes for this tag.
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, encodeChildren, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
Constructor Detail

BaseComponentRenderer

public BaseComponentRenderer()
Method Detail

getAttributeCallbacks

protected java.util.Map getAttributeCallbacks(javax.faces.component.UIComponent component)
Returns:
a map of registered RenderAttributeCallbacks for attributes that require special rendering logic

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context,
                        javax.faces.component.UIComponent component)
                 throws java.io.IOException
Renders the opening portion of the tag, prior to any children.

Overrides:
encodeBegin in class javax.faces.render.Renderer
Throws:
java.io.IOException

writeAttributes

protected void writeAttributes(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent component)
                        throws java.io.IOException
Writes the attributes for this tag.

Parameters:
context - the current FacesContext
component - the UIComponent being rendered
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)
               throws java.io.IOException
Closes the tag after children have been rendered.

Overrides:
encodeEnd in class javax.faces.render.Renderer
Throws:
java.io.IOException

getRenderedTagName

protected abstract java.lang.String getRenderedTagName(javax.faces.component.UIComponent component)
Parameters:
component - TODO
Returns:
the name of the tag to be rendered.

getAttributesToRender

protected abstract java.lang.String[] getAttributesToRender(javax.faces.component.UIComponent component)
Returns:
an array of the tag attributes to be rendered

getAttributeAliases

protected java.util.Map getAttributeAliases(javax.faces.component.UIComponent component)
Returns:
a map that returns the bean property name for any attribute that doesn't map directly (i.e., the 'class' attribute maps to the 'styleClass' bean property)

Spring Web Flow