|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.comp.DefaultView
org.barracudamvc.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 String |
dirAttrName
|
protected Map |
dirMap
|
protected String |
idAttrName
|
protected StateMap |
idMap
|
protected static org.apache.log4j.Logger |
logger
|
protected Node |
masterTemplate
|
Fields inherited from class org.barracudamvc.core.comp.DefaultView |
node, templateNodes |
Constructor Summary | |
DefaultTemplateView()
Public noargs constructor. |
|
DefaultTemplateView(Node node)
Create a view and bind it to a node. |
|
DefaultTemplateView(Node node,
String idAttrName,
StateMap idMap)
Create a view and bind it to a node. |
|
DefaultTemplateView(Node node,
String idAttrName,
String dirAttrName)
Create a view and bind it to a node. |
Method Summary | |
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(Node curnode)
Here we are going to look for custom header, footer, and body elements |
String |
getDirAttrName()
Get the directive attr name (defaults to "class"). |
StateMap |
getDirIDMap()
Get the directive ID map. |
String |
getIDAttrName()
Get the id attr name (defaults to "id"). |
Node |
getMasterTemplate()
Get the master template |
TemplateDirective |
lookupDir(String dirStr)
Look up a directive by it's string representation (rather than reparsing it). |
List |
lookupDirsByID(String idStr)
Look up a list of directives based on a given id |
void |
setDirAttrName(String idirAttrName)
Set the directive attr name. |
void |
setDirIDMap(StateMap iidMap)
Set the directive ID map. |
void |
setIDAttrName(String iidAttrName)
Set the id attr name. |
String |
toString()
Get a String describing the view |
Methods inherited from class org.barracudamvc.core.comp.DefaultView |
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.barracudamvc.core.comp.View |
getName, getNode, setName, setNode |
Field Detail |
protected static final org.apache.log4j.Logger logger
protected Node masterTemplate
protected Map dirMap
protected StateMap idMap
protected String idAttrName
protected String dirAttrName
Constructor Detail |
public DefaultTemplateView()
public DefaultTemplateView(Node node)
node
- the node the view should be bound topublic DefaultTemplateView(Node node, String idAttrName, 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(Node node, String idAttrName, StateMap idMap)
node
- the node the view should be bound toidAttrName
- name of the id attributeidMap
- the directive map to be usedMethod Detail |
public Node getMasterTemplate()
getMasterTemplate
in interface TemplateView
public void setDirIDMap(StateMap iidMap)
setDirIDMap
in interface TemplateView
iidMap
- the directive mappublic StateMap getDirIDMap()
getDirIDMap
in interface TemplateView
public void setIDAttrName(String iidAttrName)
setIDAttrName
in interface TemplateView
iidAttrName
- the name of the id attributepublic String getIDAttrName()
getIDAttrName
in interface TemplateView
public void setDirAttrName(String idirAttrName)
setDirAttrName
in interface TemplateView
idirAttrName
- the name of the attribute to search
for a list of directives inpublic String getDirAttrName()
getDirAttrName
in interface TemplateView
public TemplateDirective lookupDir(String dirStr)
lookupDir
in interface TemplateView
dirStr
- a string representation of a directive
public List lookupDirsByID(String idStr)
lookupDirsByID
in interface TemplateView
idStr
- the id in question
protected void customSearchForTemplates(Node curnode)
customSearchForTemplates
in class DefaultView
public String toString()
DefaultView
toString
in class DefaultView
public 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 |