Class AddMapEntryControl
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.AddMapEntryControl
- All Implemented Interfaces:
Serializable
A
Control for adding a new entry to a map value. Lets the user enter a key for the new entry, and provides a
button to add the entry.- Since:
- 8.5.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAddMapEntryControl(IValueAccessor<?> root, String path, IValueDescriptor<?, ? extends IValueBuilder<?>> valueDescriptor) Creates a new add map entry control. -
Method Summary
Methods inherited from class ValueReferencingControl
readValue, writeValue
-
Constructor Details
-
AddMapEntryControl
public AddMapEntryControl(IValueAccessor<?> root, String path, IValueDescriptor<?, ? extends IValueBuilder<?>> valueDescriptor) Creates a new add map entry control.- Parameters:
root- The root object against which the path is evaluated.path- The JSON path expression that references the map.valueDescriptor- The value descriptor for the map value.
-
-
Method Details
-
addRow
public void addRow()Adds a new map entry to the referenced map value, if possible. Creates a new default value from the provided value descriptor and adds it at the user-configuredkey. Does nothing if the key is empty. -
getKey
Gets the key for the new map entry to be added.- Returns:
- The key for the new map entry.
-
setKey
Sets the key for the new map entry to be added.- Parameters:
key- The key for the new map entry.
-