Class MapEntryControl

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MapEntryEndControl, MapEntryStartControl

public abstract class MapEntryControl extends ValueReferencingControl
Base class of a Control for a map entry container, either the start or end of a map entry. A map entry is part of a map value. Each entry is enclosed in a container. A map entry container may have a delete button to remove the entry from the map.
Since:
8.5.0
See Also:
  • Constructor Details

    • MapEntryControl

      protected MapEntryControl(String type, IValueAccessor<?> root, String path, String key)
      Creates a new map entry 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 list.
      key - The key of the map entry this control is associated with.
  • Method Details

    • getKey

      public String getKey()
      Gets the key of the map entry this control is associated with.
      Returns:
      The key of the map entry.
    • removeRow

      public void removeRow()
      Mutates the referenced map by removing the entry with the key, if possible. If the entry cannot be removed, this method does nothing.