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

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.LinkRenderer

public class LinkRenderer
extends AbstractRenderer

This class is responsible for rendering the link component for the HTML Render Kit.

The link component can be used as an Link


Field Summary
 
Fields inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer
BUNDLE, EVENTS_ATTRIBUTES, I18N_ATTRIBUTES
 
Constructor Summary
LinkRenderer()
           
 
Method Summary
protected  void renderAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Render the attributes for an Link tag.
protected  void renderEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Close off the Link tag.
protected  void renderStart(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Render the start of an Link (Link) tag.
 
Methods inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer
addBooleanAttributes, addCoreAttributes, addIntegerAttributes, addStringAttributes, decode, encodeBegin, encodeChildren, encodeEnd, getApplication, getAsObject, getAsString, getExternalContext, getFacesContext, getSubmittedValue, isDisabled, isPortlet, isReadOnly, renderMarkup, setSubmittedValue
 
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

LinkRenderer

public LinkRenderer()
Method Detail

renderStart

protected void renderStart(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component,
                           javax.faces.context.ResponseWriter writer)
                    throws java.io.IOException

Render the start of an Link (Link) tag.

Overrides:
renderStart in class AbstractRenderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be rendered
writer - ResponseWriter to which the element start should be rendered
Throws:
java.io.IOException - if an input/output error occurs

renderAttributes

protected void renderAttributes(javax.faces.context.FacesContext context,
                                javax.faces.component.UIComponent component,
                                javax.faces.context.ResponseWriter writer)
                         throws java.io.IOException

Render the attributes for an Link tag. The onclick attribute will contain extra javascript that will appropriately submit the form if the URL field is not set.

Overrides:
renderAttributes in class AbstractRenderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be rendered
writer - ResponseWriter to which the element attributes should be rendered
Throws:
java.io.IOException - if an input/output error occurs

renderEnd

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

Close off the Link tag.

Overrides:
renderEnd in class AbstractRenderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be rendered
writer - ResponseWriter to which the element end should be rendered
Throws:
java.io.IOException - if an input/output error occurs