org.alfresco.web.ui.common.renderer
Class BaseRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.alfresco.web.ui.common.renderer.BaseRenderer
Direct Known Subclasses:
ActionLinkRenderer, BaseMultiValueRenderer, BreadcrumbRenderer, DatePickerRenderer, ErrorsRenderer, ImagePickerRadioRenderer, ModeListRenderer, NodeDescendantsLinkRenderer, NodePathLinkRenderer, PropertySheetItemRenderer, RichListRenderer, SeparatorRenderer, YahooTreeRenderer

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

Base renderer class. Contains helper methods to assist most renderers.


Constructor Summary
BaseRenderer()
           
 
Method Summary
protected static void assertParmeters(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent component)
          Ensures that the given context and component are not null.
protected static java.util.Map getParameterComponents(javax.faces.component.UIComponent component)
          Return the map of name/value pairs for any child UIParameter components.
protected static void outputAttribute(javax.faces.context.ResponseWriter out, java.lang.Object attr, java.lang.String mapping)
          Helper to output an attribute to the output stream
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRenderer

public BaseRenderer()
Method Detail

outputAttribute

protected static void outputAttribute(javax.faces.context.ResponseWriter out,
                                      java.lang.Object attr,
                                      java.lang.String mapping)
                               throws java.io.IOException
Helper to output an attribute to the output stream

Parameters:
out - ResponseWriter
attr - attribute value object (cannot be null)
mapping - mapping to output as e.g. style="..."
Throws:
java.io.IOException

assertParmeters

protected static void assertParmeters(javax.faces.context.FacesContext ctx,
                                      javax.faces.component.UIComponent component)
Ensures that the given context and component are not null. This method should be called by all renderer methods that are given these parameters.

Parameters:
ctx - Faces context
component - The component

getParameterComponents

protected static java.util.Map getParameterComponents(javax.faces.component.UIComponent component)
Return the map of name/value pairs for any child UIParameter components.

Parameters:
component - to find UIParameter child values for
Returns:
a Map of name/value pairs or null if none found


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.