org.enhydra.barracuda.core.comp
Class BToggleButton
java.lang.Object
|
+--org.enhydra.barracuda.core.comp.AbstractBComponent
|
+--org.enhydra.barracuda.core.comp.BComponent
|
+--org.enhydra.barracuda.core.comp.BInput
|
+--org.enhydra.barracuda.core.comp.BToggleButton
- All Implemented Interfaces:
- BContainer, StateMap
- public class BToggleButton
- extends BInput
BToggleButton is used to render Radio or Checkbox buttons in
a DOM template.
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 static org.apache.log4j.Logger |
logger
|
protected boolean |
selected
|
Fields inherited from class org.enhydra.barracuda.core.comp.BInput |
BUTTON, CHECKBOX, disableBackButton, FILE, HIDDEN, IMAGE, listeners, PASSWORD, RADIO, RESET, SUBMIT, TEXT, type, value |
Constructor Summary |
BToggleButton()
Public noargs constructor |
BToggleButton(java.lang.String itype,
java.lang.String iname,
java.lang.String ivalue,
boolean iselected)
Public constructor which creates the component and
sets the initial data.
|
Method Summary |
boolean |
isSelected()
Return true if the button is selected. |
void |
setSelected(boolean iselected)
Specify whether or not the button is selected. |
void |
setType(java.lang.String itype)
Set the input type (RADIO, or CHECKBOX). |
Methods inherited from class org.enhydra.barracuda.core.comp.BComponent |
addView, getAttr, getAttrMap, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, 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, destroyCycle, findComponentMap, findRendererFactory, getChild, getChildren, getDefaultViewContext, getParent, getPreventCaching, getRenderer, getRenderer, getRootComponent, getState, getStateKeys, getStateValues, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setDefaultViewContext, setParent, setPreventCaching, toRef, toString, toString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
protected static org.apache.log4j.Logger logger
selected
protected boolean selected
BToggleButton
public BToggleButton()
- Public noargs constructor
BToggleButton
public BToggleButton(java.lang.String itype,
java.lang.String iname,
java.lang.String ivalue,
boolean iselected)
- Public constructor which creates the component and
sets the initial data.
Null values may be passed in for any parameters,
but if you do so you will need manually provide these
values (via the accessor methods) prior to actually
rendering the component
setType
public void setType(java.lang.String itype)
- Set the input type (RADIO, or CHECKBOX). If this value remains null,
the type will default to whatever is specified in the underlying
markup. If you set this value, then the type will be overridden
in all the views associated with this component.
- Overrides:
setType
in class BInput
setSelected
public void setSelected(boolean iselected)
- Specify whether or not the button is selected.
isSelected
public boolean isSelected()
- Return true if the button is selected.
- Returns:
- true if the button is selected.
Copyright © 2001 Enhydra.org