org.barracudamvc.core.comp.renderer.html
Class HTMLLabelRenderer

java.lang.Object
  extended by org.barracudamvc.core.comp.renderer.DOMComponentRenderer
      extended by org.barracudamvc.core.comp.renderer.html.HTMLComponentRenderer
          extended by org.barracudamvc.core.comp.renderer.html.HTMLLabelRenderer
All Implemented Interfaces:
Renderer

public class HTMLLabelRenderer
extends HTMLComponentRenderer

This class handles the default rendering of label into an HTML view.


Field Summary
protected static org.apache.log4j.Logger log
           
 
Fields inherited from class org.barracudamvc.core.comp.renderer.html.HTMLComponentRenderer
logger
 
Constructor Summary
HTMLLabelRenderer()
           
 
Method Summary
 Node createDefaultNode(Document doc, BComponent comp, ViewContext vc)
          The purpose of this method is for a renderer to provide a default node (if none exists).
 void renderComponent(BComponent comp, View view, ViewContext vc)
          This method should actually render the data from the component into the view, taking into consideration the specified ViewContext.
 
Methods inherited from class org.barracudamvc.core.comp.renderer.html.HTMLComponentRenderer
addChildToParent
 
Methods inherited from class org.barracudamvc.core.comp.renderer.DOMComponentRenderer
addDefaultView, bindChild, handleChildren, showNodeInterfaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

HTMLLabelRenderer

public HTMLLabelRenderer()
Method Detail

createDefaultNode

public Node createDefaultNode(Document doc,
                              BComponent comp,
                              ViewContext vc)
                       throws UnsupportedFormatException
Description copied from class: DOMComponentRenderer
The purpose of this method is for a renderer to provide a default node (if none exists). This is essentially where you would say "if I need to render myself, and I'm not actually bound to anything, what should the default markup look like if I had to create it." In most cases, its perfectly fine to just throw an UnsupportedFormatException (indicating that there is no default). The only renderer that currently implements this method is the HTMLLinkRenderer.

Specified by:
createDefaultNode in interface Renderer
Overrides:
createDefaultNode in class DOMComponentRenderer
Parameters:
doc - the master Document which can be used to create elements from scratch
comp - the component that we're dealing with for the current request
vc - the view context for the current request
Returns:
a default node (created from scratch)
Throws:
UnsupportedFormatException - if the renderer has no default node

renderComponent

public void renderComponent(BComponent comp,
                            View view,
                            ViewContext vc)
                     throws RenderException
Description copied from class: DOMComponentRenderer
This method should actually render the data from the component into the view, taking into consideration the specified ViewContext. Generally, every renderer will implement this method.

Specified by:
renderComponent in interface Renderer
Overrides:
renderComponent in class HTMLComponentRenderer
Parameters:
comp - the component to be rendered
view - the view the component should be rendered in
vc - the view context
Throws:
RenderException - if unable to render the component in the specified view


Copyright © 2006 BarracudaMVC.org All Rights Reserved.