Class ValueReferencingControl

    • Constructor Detail

      • 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 Detail

      • 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.