|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.comp.renderer.DOMComponentRenderer
public abstract class DOMComponentRenderer
This interface defines the methods needed to implement a Renderer.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
---|---|
DOMComponentRenderer()
|
Method Summary | |
---|---|
Node |
addChildToParent(Node parent,
Node child)
The purpose of this method is to add a child to a parent. |
void |
addDefaultView(BComponent comp,
Node node)
|
protected void |
bindChild(BComponent child,
View view,
ViewContext vc)
|
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). |
protected void |
handleChildren(BComponent comp,
View view,
ViewContext vc)
|
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. |
void |
showNodeInterfaces(Object object,
org.apache.log4j.Logger extLogger)
This is just a debugging method to make it easy to show the interfaces of the object being rendered with special treatment for View and BComponent objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
Constructor Detail |
---|
public DOMComponentRenderer()
Method Detail |
---|
public Node createDefaultNode(Document doc, BComponent comp, ViewContext vc) throws UnsupportedFormatException
createDefaultNode
in interface Renderer
doc
- the master Document which can be used to create elements
from scratchcomp
- the component that we're dealing with for the current requestvc
- the view context for the current request
UnsupportedFormatException
- if the renderer has no default nodepublic void addDefaultView(BComponent comp, Node node)
addDefaultView
in interface Renderer
public Node addChildToParent(Node parent, Node child) throws InvalidNodeException
addChildToParent
in interface Renderer
parent
- the parent Nodechild
- the child Node
InvalidNodeException
- if teh child cannot be added to the parentpublic void renderComponent(BComponent comp, View view, ViewContext vc) throws RenderException
renderComponent
in interface Renderer
comp
- the component to be renderedview
- the view the component should be rendered invc
- the view context
RenderException
- if unable to render the component in the
specified viewpublic void showNodeInterfaces(Object object, org.apache.log4j.Logger extLogger)
Note: if debugging is not enabled for the external logger, this method will return immediately without doing any extra work. As such, this method can be called directly without manually checking whether debugging is enabled.
protected void handleChildren(BComponent comp, View view, ViewContext vc)
protected void bindChild(BComponent child, View view, ViewContext vc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |