|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.comp.AbstractTemplateModel
This class provides the abstract implementation for a Template Model.
Field Summary | |
protected List |
listeners
|
static String |
UNDEFINED
|
protected ViewContext |
viewContext
|
Constructor Summary | |
AbstractTemplateModel()
|
Method Summary | |
void |
addModelListener(ModelListener ml)
Add a listener to the template that's notified each time a change to the data model occurs. |
void |
fireModelChanged()
Forwards the given notification event to all TemplateModelListeners that registered
themselves as listeners for this template model. |
Object |
getItem(String key)
Convenience method to get an item based on the key name (extracted from the TemplateDirective). |
Object |
getItem(TemplateDirective td)
get an item for a given template directive. |
ViewContext |
getViewContext()
Get the current ViewContext |
boolean |
processDirective(TemplateDirective td)
process any directives. return false to indicate a the node containing this directive should be skipped. |
void |
removeModelListener(ModelListener ml)
Remove a listener |
void |
setViewContext(ViewContext ivc)
Specify the ViewContext. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.enhydra.barracuda.core.comp.TemplateModel |
getName |
Field Detail |
public static final String UNDEFINED
protected ViewContext viewContext
protected List listeners
Constructor Detail |
public AbstractTemplateModel()
Method Detail |
public void addModelListener(ModelListener ml)
addModelListener
in interface Model
ml
- the TemplateModelListenerpublic void removeModelListener(ModelListener ml)
removeModelListener
in interface Model
ml
- the TemplateModelListenerpublic void fireModelChanged()
TemplateModelListeners
that registered
themselves as listeners for this template model.
public boolean processDirective(TemplateDirective td)
processDirective
in interface TemplateModel
public Object getItem(TemplateDirective td)
getItem
in interface TemplateModel
public Object getItem(String key)
public void setViewContext(ViewContext ivc)
setViewContext
in interface Contextual
ivc
- the current ViewContextpublic ViewContext getViewContext()
getViewContext
in interface Contextual
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |