org.sakaiproject.jsf.renderer
Class AlphaIndexRenderer

java.lang.Object
  extended byjavax.faces.render.Renderer
      extended byorg.sakaiproject.jsf.renderer.AlphaIndexRenderer

public class AlphaIndexRenderer
extends Renderer

Description:

Render an alphabetical index. Makes any letter that exists in the initials parameter a link.

Copyright: Copyright (c) 2004

Organization: Sakai Project

Version:
$Id: AlphaIndexRenderer.java 597 2005-07-13 20:26:17Z janderse@umich.edu $
Author:
Ed Smiley

Constructor Summary
AlphaIndexRenderer()
           
 
Method Summary
 void decode(FacesContext context, UIComponent component)
           
 void encodeBegin(FacesContext context, UIComponent component)
           
 void encodeChildren(FacesContext context, UIComponent component)
           
 void encodeEnd(FacesContext context, UIComponent component)
          Render an alphabetical index.
 boolean supportsComponentType(UIComponent component)
           
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlphaIndexRenderer

public AlphaIndexRenderer()
Method Detail

supportsComponentType

public boolean supportsComponentType(UIComponent component)

decode

public void decode(FacesContext context,
                   UIComponent component)

encodeBegin

public void encodeBegin(FacesContext context,
                        UIComponent component)
                 throws IOException
Throws:
IOException

encodeChildren

public void encodeChildren(FacesContext context,
                           UIComponent component)
                    throws IOException
Throws:
IOException

encodeEnd

public void encodeEnd(FacesContext context,
                      UIComponent component)
               throws IOException

Render an alphabetical index. Makes any letter that exists in the initials parameter a link. Any other is simply displayed.

Example:
| <a href='#A'><b>A</b></a> | <b>B</b>...

Parameters:
context - FacesContext for the request we are processing
component - UIComponent to be rendered
Throws:
IOException - if an input/output error occurs while rendering
NullPointerException - if context or component is null