|
|||||||||||
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.BInput
BInput is used to manipulate the <input> element 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 BAction |
baction
|
static String |
BUTTON
|
static String |
CHECKBOX
|
protected boolean |
disableBackButton
|
static String |
FILE
|
static String |
HIDDEN
|
static String |
IMAGE
|
protected List |
listeners
|
protected static org.apache.log4j.Logger |
logger
|
static String |
PASSWORD
|
static String |
RADIO
|
static String |
RESET
|
static String |
SUBMIT
|
static String |
TEXT
|
protected String |
type
|
protected String |
value
|
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 | |
BInput()
Public noargs constructor |
|
BInput(String itype,
String iname,
String ivalue)
Public constructor which creates the component and sets the initial data. |
Method Summary | |
void |
addEventListener(ListenerFactory lf)
Add an event listener to this component. |
void |
addEventListener(ListenerFactory lf,
boolean idisableBackButton)
Add an event listener to this component. |
BAction |
getAction()
Returns the action associated with this component (if any) |
String |
getType()
Get the type of input. |
String |
getValue()
Get the value for this input. |
protected void |
preRender(ViewContext vc,
int depth)
Here in the pre-render phase we actually add BAction step children for any of the listeners that might have been added to this component |
void |
removeEventListener(ListenerFactory lf)
Remove an event listener from this component |
void |
setAction(BAction ibaction)
Specify an action for this component (rather than adding an even listener) |
void |
setType(String itype)
Set the input type (TEXT, PASSWORD, SUBMIT, RESET, FILE, HIDDEN, IMAGE, BUTTON, RADIO, or CHECKBOX). |
void |
setValue(Object ivalue)
Convenience mechanism to set the value for this input using an Object. |
void |
setValue(String ivalue)
Set the value for this input. |
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, clearState, destroyCycle, 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
public static final String TEXT
public static final String PASSWORD
public static final String SUBMIT
public static final String RESET
public static final String FILE
public static final String HIDDEN
public static final String IMAGE
public static final String BUTTON
public static final String RADIO
public static final String CHECKBOX
protected List listeners
protected String type
protected String value
protected boolean disableBackButton
protected BAction baction
Constructor Detail |
public BInput()
public BInput(String itype, String iname, String ivalue)
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
itype
- valid input type. May be null (indicating don't render
this attribute)iname
- the name of the button, or null (indicating
don't render this attribute)ivalue
- a String value for the input. May be null (indicating
don't render this attribute)Method Detail |
public void setType(String itype)
itype
- an string value representing the size.public String getType()
public void setValue(Object ivalue)
ivalue
- the value objectpublic void setValue(String ivalue)
ivalue
- the value objectpublic String getValue()
public void setAction(BAction ibaction)
ibaction
- the action to be fired when the BSelect is activated on the clientpublic BAction getAction()
public void addEventListener(ListenerFactory lf)
lf
- the event listener to be addedpublic void addEventListener(ListenerFactory lf, boolean idisableBackButton)
lf
- the event listener to be addedidisableBackButton
- true if the back button should be
disabled when the action occurspublic void removeEventListener(ListenerFactory lf)
lf
- the event listener to be removedprotected void preRender(ViewContext vc, int depth)
preRender
in class BComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |