com.sun.rave.web.ui.renderer
Class BreadcrumbsRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by com.sun.rave.web.ui.renderer.AbstractRenderer
          extended by com.sun.rave.web.ui.renderer.BreadcrumbsRenderer

public class BreadcrumbsRenderer
extends AbstractRenderer

Renderer for a Breadcrumbs component.

This class renders a breadcrumb or parentage path.


Field Summary
 
Fields inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer
BUNDLE, EVENTS_ATTRIBUTES, I18N_ATTRIBUTES
 
Constructor Summary
BreadcrumbsRenderer()
          Creates a new instance of BreadcrumbsRenderer
 
Method Summary
 void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Overrides encodeChildren of Renderer to do nothing.
 boolean getRendersChildren()
          Returns a flag indicating that this component is responsible for rendering it's children.
protected  void renderBreadcrumbsLink(javax.faces.context.FacesContext context, Hyperlink link, Theme theme)
          Renders the hyperlinks which make up the breadcrumbs.
protected  void renderBreadcrumbsSeparator(javax.faces.context.FacesContext context, Breadcrumbs breadcrumbs, Theme theme, javax.faces.context.ResponseWriter writer)
          Renders the separator between the elements of the breadcrumbs.
protected  void renderBreadcrumbsText(javax.faces.context.FacesContext context, Hyperlink crumb, Theme theme, javax.faces.context.ResponseWriter writer)
          Renders the final breadcrumb text which represents the current page.
protected  void renderContainingTable(javax.faces.context.FacesContext context, Breadcrumbs breadcrumbs, Theme theme, javax.faces.context.ResponseWriter writer)
          Renders the attributes for the table containing the breadcrumbs.
protected  void renderEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Renders the breadcrumbs.
 
Methods inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer
addBooleanAttributes, addCoreAttributes, addIntegerAttributes, addStringAttributes, decode, encodeBegin, encodeEnd, getApplication, getAsObject, getAsString, getExternalContext, getFacesContext, getSubmittedValue, isDisabled, isPortlet, isReadOnly, renderAttributes, renderMarkup, renderStart, setSubmittedValue
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, getConvertedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadcrumbsRenderer

public BreadcrumbsRenderer()
Creates a new instance of BreadcrumbsRenderer

Method Detail

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                    throws java.io.IOException
Overrides encodeChildren of Renderer to do nothing. This class renders its own children, but not through this method.

Overrides:
encodeChildren in class AbstractRenderer
Parameters:
context - The FacesContext of the request
component - The component associated with the renderer.
Throws:
java.io.IOException - if an input/output error occurs

getRendersChildren

public boolean getRendersChildren()
Returns a flag indicating that this component is responsible for rendering it's children.

Overrides:
getRendersChildren in class javax.faces.render.Renderer

renderContainingTable

protected void renderContainingTable(javax.faces.context.FacesContext context,
                                     Breadcrumbs breadcrumbs,
                                     Theme theme,
                                     javax.faces.context.ResponseWriter writer)
                              throws java.io.IOException
Renders the attributes for the table containing the breadcrumbs.

Parameters:
context - The current FacesContext
breadcrumbs - The Breadcrumbs object to use
theme - The theme to use
writer - The current ResponseWriter
Throws:
java.io.IOException - if an input/output error occurs

renderBreadcrumbsSeparator

protected void renderBreadcrumbsSeparator(javax.faces.context.FacesContext context,
                                          Breadcrumbs breadcrumbs,
                                          Theme theme,
                                          javax.faces.context.ResponseWriter writer)
                                   throws java.io.IOException
Renders the separator between the elements of the breadcrumbs.

Parameters:
context - The current FacesContext
breadcrumbs - The Breadcrumbs object to use
theme - The theme to use
writer - The current ResponseWriter
Throws:
java.io.IOException - if an input/output error occurs

renderBreadcrumbsLink

protected void renderBreadcrumbsLink(javax.faces.context.FacesContext context,
                                     Hyperlink link,
                                     Theme theme)
                              throws java.io.IOException
Renders the hyperlinks which make up the breadcrumbs.

Parameters:
context - The current FacesContext
link - The component representing a page in the breadcrumbs.
theme - The theme to use This must be a Hyperlink or subclass of a Hyperlink.
Throws:
java.io.IOException - if an input/output error occurss

renderBreadcrumbsText

protected void renderBreadcrumbsText(javax.faces.context.FacesContext context,
                                     Hyperlink crumb,
                                     Theme theme,
                                     javax.faces.context.ResponseWriter writer)
                              throws java.io.IOException
Renders the final breadcrumb text which represents the current page.

Parameters:
context - The current FacesContext
breadcrumbs - The Breadcrumbs object to use
pageName - The current page name.
theme - The theme to use
writer - The current ResponseWriter
Throws:
java.io.IOException - if an input/output error occurss

renderEnd

protected void renderEnd(javax.faces.context.FacesContext context,
                         javax.faces.component.UIComponent component,
                         javax.faces.context.ResponseWriter writer)
                  throws java.io.IOException
Renders the breadcrumbs.

Overrides:
renderEnd in class AbstractRenderer
Parameters:
context - The current FacesContext
component - The Breadcrumbs object to use
writer - The current ResponseWriter
Throws:
java.io.IOException - if an input/output error occurss