|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.comp.AbstractBComponent
org.barracudamvc.core.comp.BComponent
org.barracudamvc.core.comp.BTemplate
public class 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.barracudamvc.core.comp.BComponent |
---|
DEFAULT_ENCODING, enabled, enc, name, rs, VISIBILITY_MARKER, visible |
Fields inherited from class org.barracudamvc.core.comp.AbstractBComponent |
---|
attrs, 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.barracudamvc.core.comp.BComponent |
---|
addView, decodeStr, encodeStr, getEncoding, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, preRender, removeAllViews, removeView, render, render, renderView, renderView, setEnabled, setEnabled, setEncoding, setName, setRenderStrategy, setView, setVisible, setVisible, supports |
Methods inherited from class org.barracudamvc.core.comp.AbstractBComponent |
---|
addChild, addStepChild, addStepChild, addTempView, clearState, findComponentMap, findRendererFactory, getAttr, getAttrMap, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRendererFactory, getRootComponent, getState, getStateKeys, getStateStore, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setAttr, 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 |