Class ValueReferencingControl

java.lang.Object
de.xima.fc.gui.model.value_descriptor_form.Control
de.xima.fc.gui.model.value_descriptor_form.ValueReferencingControl
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AddListItemControl, AddMapEntryControl, AddRecordEntryControl, EditableControl, ListItemControl, MapEntryControl, RecordEntryControl

public abstract class ValueReferencingControl extends Control
A Control that references a value via a JSON path expression.
Since:
8.5.0
See Also:
  • Constructor Details

    • ValueReferencingControl

      protected ValueReferencingControl(String type, IValueAccessor<?> root, String path)
      Creates a new value-referencing control.
      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.
  • Method Details

    • readValue

      protected final Object readValue()
      Reads the value referenced by the control's path expression from the root object.
      Returns:
      The referenced value, or null if the path does not resolve to a value.
    • writeValue

      protected final void writeValue(Object value)
      Writes a value to the location referenced by the control's path expression in the root object. If the path is "$", the root object itself is replaced with the new value.
      Parameters:
      value - The value to write.