|
|||||||||||
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.BText
BText is used for rendering text into a DOM. You can bind it to just about any type of node, and it will do its best to put the text in the proper place.
In most cases you will not actually need to bind the component to a view in order to use it--if you return it from a model, this will be done for you automatically. If however, you intend to use the component standalone (ie. manually attaching it to a specific node in the DOM) or inline (ie. in a toString()), then you MUST BIND IT TO A VIEW before rendering, or an error will be generated.
Field Summary | |
protected boolean |
allowMarkupInText
|
protected static org.apache.log4j.Logger |
logger
|
protected String |
text
|
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 | |
BText()
Public noargs constructor |
|
BText(String text)
Public constructor which creates the component and sets the text. |
Method Summary | |
boolean |
allowMarkupInText()
See if we allow markup in the text |
String |
getText()
Get the text for this particular component |
BText |
setAllowMarkupInText(boolean val)
Do we wish to allow markup in this text (defaults to false) |
BText |
setText(String itext)
Set the text for this particular component |
String |
toString()
Get a String representation of 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, destroyCycle, findComponentMap, findRendererFactory, getAttr, getAttrMap, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRootComponent, getState, getStateKeys, getStateStore, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setAttr, setDefaultViewContext, setParent, toRef, 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 String text
protected boolean allowMarkupInText
Constructor Detail |
public BText()
public BText(String text)
You should generally only use this constructor when returning BText from a Model, as the model components will automatically bind the component to a view for you. If you use this constructor in some other situation, you should manually bind the component to the proper view.
text
- the text string that backs this componentMethod Detail |
public BText setText(String itext)
itext
- the text representation of this componentpublic String getText()
public BText setAllowMarkupInText(boolean val)
val
- true if we wish to allow markup in the textpublic boolean allowMarkupInText()
public String toString()
toString
in class AbstractBComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |