|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.comp.AbstractBComponent
org.enhydra.barracuda.core.comp.BComponent
org.enhydra.barracuda.core.comp.BTemplate
A BTemplate is used to process part of a DOM as a template--the component will look for directives and then query the models to return the data associated with a given key. BTemplate essentially brings "pull-mvc" to XMLC.
In the case of BTemplate, you will ALMOST ALWAYS need to manually bind it to a View, unless you happen to be returning it from a model (in which case this will be done for you automatically)
Field Summary | |
protected static org.apache.log4j.Logger |
logger
|
protected HashMap |
templateModels
|
Fields inherited from class org.enhydra.barracuda.core.comp.BComponent |
attrs, enabled, name, rs, VISIBILITY_MARKER, visible |
Fields inherited from class org.enhydra.barracuda.core.comp.AbstractBComponent |
children, dvc, isStepChild, parent, statemap, stepChildren, tempViews, validated, views |
Constructor Summary | |
BTemplate()
Public noargs constructor |
|
BTemplate(TemplateModel imodel)
Public constructor which creates the component and binds it to a specific model. |
Method Summary | |
void |
addModel(TemplateModel imodel)
Add a model to the component. |
void |
addModels(List ilist)
Add a whole list of models to the component. |
void |
destroyCycle()
Destroy cycle. |
TemplateModel |
getModel(String modelName)
Get the model that backs the table |
List |
getModels()
Get a list of models associated with this view |
void |
removeAllModels()
Remove all models from the component |
void |
removeModel(String modelName)
Remove a model from the component by model name |
void |
removeModel(TemplateModel imodel)
Remove a model from the component. |
Methods inherited from class org.enhydra.barracuda.core.comp.BComponent |
addView, getAttr, getAttrMap, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, preRender, removeAllViews, removeView, render, render, renderView, renderView, setAttr, setEnabled, setEnabled, setName, setRenderStrategy, setView, setVisible, setVisible, supports |
Methods inherited from class org.enhydra.barracuda.core.comp.AbstractBComponent |
addChild, addStepChild, addStepChild, addTempView, clearState, findComponentMap, findRendererFactory, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRootComponent, getState, getStateKeys, getStateValues, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setDefaultViewContext, setParent, toRef, toString, toString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger logger
protected HashMap templateModels
Constructor Detail |
public BTemplate()
public BTemplate(TemplateModel imodel)
imodel
- the specific model to back this componentMethod Detail |
public void addModel(TemplateModel imodel)
imodel
- a model that backs the templatepublic void addModels(List ilist)
ilist
- a list of TemplateModels to back the componentpublic void removeModel(TemplateModel imodel)
imodel
- a model that backs the templatepublic void removeModel(String modelName)
modelName
- the name of the model to be removedpublic void removeAllModels()
public TemplateModel getModel(String modelName)
modelName
- the name of the model we're interested inpublic List getModels()
public void destroyCycle()
destroyCycle
in class AbstractBComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |