org.enhydra.barracuda.core.comp.renderer.html
Class HTMLComponentRenderer

java.lang.Object
  |
  +--org.enhydra.barracuda.core.comp.renderer.DOMComponentRenderer
        |
        +--org.enhydra.barracuda.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  EnabledHelper eh
           
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
HTMLComponentRenderer()
           
 
Method Summary
 org.w3c.dom.Node addChildToParent(org.w3c.dom.Node parent, org.w3c.dom.Node child)
          The purpose of this method is to add a child to a parent.
 org.w3c.dom.Node createDefaultNode(org.w3c.dom.Document doc, BComponent comp, ViewContext vc)
          The purpose of this method is to create a default Node to be used when the component is not bound to any specific view.
 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.enhydra.barracuda.core.comp.renderer.DOMComponentRenderer
showNodeInterfaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

eh

protected EnabledHelper eh
Constructor Detail

HTMLComponentRenderer

public HTMLComponentRenderer()
Method Detail

addChildToParent

public org.w3c.dom.Node addChildToParent(org.w3c.dom.Node parent,
                                         org.w3c.dom.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

createDefaultNode

public org.w3c.dom.Node createDefaultNode(org.w3c.dom.Document doc,
                                          BComponent comp,
                                          ViewContext vc)
                                   throws UnsupportedFormatException
The purpose of this method is to create a default Node to be used when the component is not bound to any specific view. The default functionality is to simply clone the template node...

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 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 © 2001 Enhydra.org