Class DescriptorEditableControl<Value>
java.lang.Object
de.xima.fc.gui.model.value_descriptor_form.Control
de.xima.fc.gui.model.value_descriptor_form.ValueReferencingControl
de.xima.fc.gui.model.value_descriptor_form.EditableControl<Value>
de.xima.fc.gui.model.value_descriptor_form.DescriptorEditableControl<Value>
- Type Parameters:
Value- The type of the value being edited.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BooleanControl, MultiLineLargeStringControl, SingleLineLargeStringControl
An
EditableControl that uses an IValueDescriptor to coerce values.- Since:
- 8.5.0
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDescriptorEditableControl(String type, IValueAccessor<?> root, String path, IValueDescriptor<Value, ?> descriptor) Creates a new editable control for editing a value described by the given descriptor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final ValuecoerceValue(Object value) Coerces the given value to conform to the restrictions imposed by the value descriptor.Methods inherited from class EditableControl
getDescription, getLabel, getValue, isFcPlaceholders, isRequired, setDescription, setFcPlaceholders, setLabel, setRequired, setValueMethods inherited from class ValueReferencingControl
readValue, writeValue
-
Constructor Details
-
DescriptorEditableControl
protected DescriptorEditableControl(String type, IValueAccessor<?> root, String path, IValueDescriptor<Value, ?> descriptor) Creates a new editable control for editing a value described by the given descriptor.- Parameters:
type- The type of the control that determines how it is rendered.root- The root object against which the path is evaluated.path- The JSON path expression that references the value.descriptor- The descriptor that describes the value being edited.
-
-
Method Details
-
coerceValue
Description copied from class:EditableControlCoerces the given value to conform to the restrictions imposed by the value descriptor. This method is called byEditableControl.getValue()andEditableControl.setValue(Object)to ensure that the value is always valid.- Specified by:
coerceValuein classEditableControl<Value>- Parameters:
value- The value to coerce.- Returns:
- The coerced value.
-