public class UiControl<T,C extends UiControl<T,C>> extends UiComponent<T,C> implements UiHasFocusEvents<T,C>
Constructor and Description |
---|
UiControl(UiContainer<?> rParent,
java.lang.Class<? super T> rDatatype)
Creates a new instance.
|
UiControl(UiContainer<?> rParent,
org.obrel.core.RelationType<T> rParamType)
Creates a new instance with an existing parameter type.
|
Modifier and Type | Method and Description |
---|---|
C |
onFocusLost(java.util.function.Consumer<T> rEventHandler)
Registers an event handler that will be invoked if a interactive
component loses the input focus.
|
C |
validateFinally(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
Sets a final validation for the control's input value.
|
C |
validateInteractive(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
Sets an interactive validation for the control's input value.
|
void |
validateNow(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
Immediately validates whether the input value of this control fulfills a
certain constraint.
|
applyProperties, attachTo, cell, cell, getComponentStyleName, getImage, getParent, getRootView, getValueImpl, getView, height, icon, image, label, placeBefore, resid, setValueImpl, size, style, style, styleName, tooltip, toString, update, visibleOn, width
clear, disable, enable, fragment, get, getParam, has, hide, id, initiateDownload, isEnabled, isVisible, remove, set, set, set, setEnabled, setFragment, setParam, setParameterEventHandler, setParameterType, setVisible, show, type
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, transform, writeRelations
public UiControl(UiContainer<?> rParent, org.obrel.core.RelationType<T> rParamType)
public UiControl(UiContainer<?> rParent, java.lang.Class<? super T> rDatatype)
public final C onFocusLost(java.util.function.Consumer<T> rEventHandler)
onFocusLost
in interface UiHasFocusEvents<T,C extends UiControl<T,C>>
rEventHandler
- The event handler to be invokedpublic C validateFinally(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
fValidation
- The validation functionvalidateNow(Function)
,
validateInteractive(Function)
public C validateInteractive(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
Because this validation type is executed on each interaction event it should be used cautiously and only if continuous validation is really needed. Otherwise a continuous signaling of errors can become annoying for the user.
fValidation
- The validation functionvalidateNow(Function)
,
validateFinally(Function)
public void validateNow(java.util.function.Function<? super T,de.esoco.lib.expression.function.Validation.ValidationResult> fValidation)
validateInteractive(Function)
and validateFinally(Function)
should be used.fValidation
- The validation function for the control valueInvalidParametersException
- If the validation failsvalidateInteractive(Function)
,
validateFinally(Function)