|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.NodeContainer
to.etc.domui.dom.html.Div
to.etc.domui.component.input.AbstractDivControl<T>
public abstract class AbstractDivControl<T>
Abstract base class for a control that is implemented on top of a DIV. This handles most basic actions required of all controls.
Constructor Summary | |
---|---|
AbstractDivControl()
|
Method Summary | |
---|---|
IBinder |
bind()
Return the binder for this control. |
abstract void |
createContent()
|
protected void |
disabledChanged()
|
IValueChanged<?> |
getOnValueChanged()
|
T |
getValue()
Returns the current value of this input component. |
T |
getValueSafe()
Like IDisplayControl.getValue() this returns the value of the component, but this returns null
if the value was invalid. |
boolean |
isBound()
Returns T if this control is bound to some data value. |
boolean |
isDisabled()
Returns T if the control is currently in disabled. |
boolean |
isMandatory()
Returns T if this control is a mandatory input. |
boolean |
isReadOnly()
Returns T if the control is currently in readonly mode. |
protected void |
mandatoryChanged()
|
protected void |
readOnlyChanged()
|
void |
setDisabled(boolean d)
Set the input to disabled mode. |
void |
setMandatory(boolean m)
Make the control mandatory. |
void |
setOnValueChanged(IValueChanged<?> onValueChanged)
|
void |
setReadOnly(boolean ro)
Sets the input to readonly-mode. |
void |
setValue(T v)
Set a new value into this control. |
protected void |
validate()
|
Methods inherited from class to.etc.domui.dom.html.Div |
---|
afterCreateContent, componentHandleWebAction, fadeIn, fadeIn, fadeOut, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visit |
Methods inherited from class to.etc.domui.dom.html.NodeContainer |
---|
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface to.etc.domui.dom.html.IControl |
---|
getErrorLocation, hasError, setErrorLocation |
Methods inherited from interface to.etc.domui.dom.html.IDisplayControl |
---|
setTestID |
Methods inherited from interface to.etc.domui.dom.html.IActionControl |
---|
setTestID |
Methods inherited from interface to.etc.domui.dom.errors.INodeErrorDelegate |
---|
clearMessage, getMessage, setMessage |
Constructor Detail |
---|
public AbstractDivControl()
Method Detail |
---|
public abstract void createContent() throws java.lang.Exception
createContent
in class NodeBase
java.lang.Exception
public T getValueSafe()
IControl
IDisplayControl.getValue()
this returns the value of the component, but this returns null
if the value was invalid. For this method NULL either means the value was invalid OR
it's content was empty. To distinguish between the two call IControl.hasError()
or use
IDisplayControl.getValue()
instead of this call.
getValueSafe
in interface IControl<T>
public boolean isMandatory()
IControl
isMandatory
in interface IControl<T>
public void setMandatory(boolean m)
IControl
setMandatory
in interface IControl<T>
protected void mandatoryChanged()
public boolean isReadOnly()
IControl
isReadOnly
in interface IControl<T>
public void setReadOnly(boolean ro)
IControl
setReadOnly
in interface IControl<T>
protected void readOnlyChanged()
public T getValue()
IDisplayControl
ValidationException
. This means that this
call either delivers correct input (as defined by it's converter and validators), null
(when empty) or throws an exception. When a ValidationException occurs the framework
mostly ignores it - it does not produce a stacktrace or error in the client. Instead
the resulting error as posted by the error handling framework gets displayed on the
form when the request completes.
To get the value of a component while ignoring exceptions call #getValueSafe()
.
getValue
in interface IDisplayControl<T>
protected void validate()
public void setValue(T v)
IDisplayControl
setValue
in interface IDisplayControl<T>
public boolean isDisabled()
IControl
isDisabled
in interface IControl<T>
public void setDisabled(boolean d)
IActionControl
setDisabled
in interface IActionControl
protected void disabledChanged()
public IValueChanged<?> getOnValueChanged()
getOnValueChanged
in interface IHasChangeListener
public void setOnValueChanged(IValueChanged<?> onValueChanged)
setOnValueChanged
in interface IHasChangeListener
public IBinder bind()
bind
in interface IBindable
IBindable.bind()
public boolean isBound()
isBound
in interface IBindable
IBindable.isBound()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |