public interface IControl<T> extends IActionControl, IHasChangeListener, INodeErrorDelegate
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorLocation()
When set this contains a user-understandable tekst indicating which control has the error.
|
T |
getValue()
Returns the current value of this input component.
|
T |
getValueSafe()
Like
getValue() this returns the value of the component, but this returns null
if the value was invalid. |
boolean |
hasError()
Returns T if this control is currently in error state, meaning it's input is in some way
invalid.
|
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.
|
void |
setErrorLocation(String errorLocation)
When set this contains a user-understandable tekst indicating which control has the error.
|
void |
setMandatory(boolean ro)
Make the control mandatory.
|
void |
setReadOnly(boolean ro)
Sets the input to readonly-mode.
|
void |
setValue(T v)
Set a new value into this control.
|
setDisabled, setTestIDgetOnValueChanged, setOnValueChangedclearMessage, getMessage, setMessagevoid setValue(@Nullable T v)
v - @Nullable T getValue()
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().
T getValueSafe()
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 hasError() or use
getValue() instead of this call.boolean hasError()
boolean isReadOnly()
void setReadOnly(boolean ro)
ro - boolean isDisabled()
boolean isMandatory()
void setMandatory(boolean ro)
ro - void setErrorLocation(@Nullable String errorLocation)
errorLocation - Copyright © 2017 etc.to. All rights reserved.