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

java.lang.Object
  extended byorg.barracudamvc.core.comp.renderer.DOMComponentRenderer
      extended byorg.barracudamvc.core.comp.renderer.html.HTMLComponentRenderer
All Implemented Interfaces:
Renderer
Direct Known Subclasses:
HTMLActionRenderer, HTMLInputRenderer, HTMLListRenderer, HTMLTableRenderer, HTMLTemplateRenderer, HTMLTextRenderer

public class HTMLComponentRenderer
extends DOMComponentRenderer

This interface defines the methods needed to implement a Renderer.


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
HTMLComponentRenderer()
           
 
Method Summary
 Node addChildToParent(Node parent, Node child)
          The purpose of this method is to add a child to a parent.
 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.DOMComponentRenderer
createDefaultNode, showNodeInterfaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

HTMLComponentRenderer

public HTMLComponentRenderer()
Method Detail

addChildToParent

public Node addChildToParent(Node parent,
                             Node child)
                      throws InvalidNodeException
Description copied from class: DOMComponentRenderer
The purpose of this method is to add a child to a parent. In many cases, this method is used to ensure that the resulting markup is valid, by inserting the appropriate markup in between the child and the parent. In many cases, the generic Component renderer will be the only renderer that actually implements this method.

Specified by:
addChildToParent in interface Renderer
Overrides:
addChildToParent in class DOMComponentRenderer
Parameters:
parent - the parent Node
child - the child Node
Returns:
the resulting parent node
Throws:
InvalidNodeException - if teh child cannot be added to the parent

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 DOMComponentRenderer
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 © 2004 BarracudaMVC.org All Rights Reserved.