|
||||||||||
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.BLabel
public class BLabel
BLabel is used for rendering a LABEL tag. It will use the label
node it is bound to, or will override the node with its default
label node when returned from a model.
If a BLabel has a BInput child, it will then set the BInput's id
attribute to BLabel's forId value.
Beware, 'id's should be unique in a HTML document !
Field Summary | |
---|---|
protected String |
forId
|
protected static org.apache.log4j.Logger |
log
|
protected String |
text
|
Fields inherited from class org.barracudamvc.core.comp.BComponent |
---|
DEFAULT_ENCODING, enabled, enc, logger, 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 | |
---|---|
BLabel()
Public noargs constructor |
|
BLabel(String label,
BInput bi)
Public constructor which creates the component, add a BInput as child and sets forId to BInput's name. |
|
BLabel(String text,
String id)
Public constructor which creates the component, and sets label and forId. |
Method Summary | |
---|---|
BContainer |
addChild(BContainer child)
Overrides addChild in BContainer, to check if the added child is a BInput. |
String |
getForId()
Get the forId attribute for this label component |
String |
getText()
Get the text for this particular component |
BLabel |
setForId(String id)
Set the forId attribute for this label component |
BLabel |
setText(String itext)
Set the label 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 |
---|
addStepChild, addStepChild, addTempView, clearState, destroyCycle, 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, 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 log
protected String text
protected String forId
Constructor Detail |
---|
public BLabel()
public BLabel(String label, BInput bi)
label
- the label string that backs this componentbi
- the BInput this label refers topublic BLabel(String text, String id)
label
- the label string that backs this componentid
- the forId attribute of BLabel. Should refer to the id of an inputMethod Detail |
---|
public BContainer addChild(BContainer child)
addChild
in interface BContainer
addChild
in class AbstractBComponent
child
- the child container to be addedpublic BLabel setText(String itext)
itext
- the text of this labelpublic String getText()
public BLabel setForId(String id)
id
- the forId attribute for this label componentpublic String getForId()
public String toString()
toString
in class AbstractBComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |