|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.barracuda.core.comp.DefaultView | +--org.enhydra.barracuda.core.comp.DefaultTemplateView
This class provides the default implementation for a TemplateView. It provides a View for components to render themselves in.
Field Summary | |
protected java.lang.String |
dirAttrName
|
protected java.util.Map |
dirMap
|
protected java.lang.String |
idAttrName
|
protected StateMap |
idMap
|
protected static org.apache.log4j.Logger |
logger
|
protected org.w3c.dom.Node |
masterTemplate
|
Fields inherited from class org.enhydra.barracuda.core.comp.DefaultView |
localFactory, node, templateNodes |
Constructor Summary | |
DefaultTemplateView()
Public noargs constructor. |
|
DefaultTemplateView(org.w3c.dom.Node node)
Create a view and bind it to a node. |
|
DefaultTemplateView(org.w3c.dom.Node node,
java.lang.String idAttrName,
StateMap idMap)
Create a view and bind it to a node. |
|
DefaultTemplateView(org.w3c.dom.Node node,
java.lang.String idAttrName,
java.lang.String dirAttrName)
Create a view and bind it to a node. |
Method Summary | |
java.lang.Object |
clone()
When a template view is cloned, the underlying masterTemplate node is set to null; this ensures the new node to which this view is bound will in fact be used for the template |
protected void |
customSearchForTemplates(org.w3c.dom.Node curnode)
Here we are going to look for custom header, footer, and body elements |
java.lang.String |
getDirAttrName()
Get the directive attr name (defaults to "class"). |
StateMap |
getDirIDMap()
Get the directive ID map. |
java.lang.String |
getIDAttrName()
Get the id attr name (defaults to "id"). |
org.w3c.dom.Node |
getMasterTemplate()
Get the master template |
TemplateDirective |
lookupDir(java.lang.String dirStr)
Look up a directive by it's string representation (rather than reparsing it). |
java.util.List |
lookupDirsByID(java.lang.String idStr)
Look up a list of directives based on a given id |
void |
setDirAttrName(java.lang.String idirAttrName)
Set the directive attr name. |
void |
setDirIDMap(StateMap iidMap)
Set the directive ID map. |
void |
setIDAttrName(java.lang.String iidAttrName)
Set the id attr name. |
java.lang.String |
toString()
Get a String describing the view |
Methods inherited from class org.enhydra.barracuda.core.comp.DefaultView |
getElementFactory, getName, getNode, searchForTemplates, setName, setNode |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.enhydra.barracuda.core.comp.View |
getElementFactory, getName, getNode, setName, setNode |
Field Detail |
protected static org.apache.log4j.Logger logger
protected org.w3c.dom.Node masterTemplate
protected java.util.Map dirMap
protected StateMap idMap
protected java.lang.String idAttrName
protected java.lang.String dirAttrName
Constructor Detail |
public DefaultTemplateView()
public DefaultTemplateView(org.w3c.dom.Node node)
node
- the node the view should be bound topublic DefaultTemplateView(org.w3c.dom.Node node, java.lang.String idAttrName, java.lang.String dirAttrName)
node
- the node the view should be bound toidAttrName
- name of the id attributedirAttrName
- name of the attribute to search for
directives inpublic DefaultTemplateView(org.w3c.dom.Node node, java.lang.String idAttrName, StateMap idMap)
node
- the node the view should be bound toidAttrName
- name of the id attributeMethod Detail |
public org.w3c.dom.Node getMasterTemplate()
getMasterTemplate
in interface TemplateView
public void setDirIDMap(StateMap iidMap)
setDirIDMap
in interface TemplateView
public StateMap getDirIDMap()
getDirIDMap
in interface TemplateView
public void setIDAttrName(java.lang.String iidAttrName)
setIDAttrName
in interface TemplateView
public java.lang.String getIDAttrName()
getIDAttrName
in interface TemplateView
public void setDirAttrName(java.lang.String idirAttrName)
setDirAttrName
in interface TemplateView
public java.lang.String getDirAttrName()
getDirAttrName
in interface TemplateView
public TemplateDirective lookupDir(java.lang.String dirStr)
lookupDir
in interface TemplateView
dirStr
- a string representation of a directive
public java.util.List lookupDirsByID(java.lang.String idStr)
lookupDirsByID
in interface TemplateView
idStr
- the id in question
protected void customSearchForTemplates(org.w3c.dom.Node curnode)
customSearchForTemplates
in class DefaultView
public java.lang.String toString()
DefaultView
toString
in class DefaultView
public java.lang.Object clone()
clone
in interface View
clone
in class DefaultView
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |