Record Class DynamicViewHandlerDefinition

java.lang.Object
java.lang.Record
io.jmix.dynmodel.meta.DynamicViewHandlerDefinition
Record Components:
name - optional handler name, unique within the view; named handlers can be invoked as dialog follow-ups
event - trigger kind; a handler without an event is not wired to a trigger and must have a name
componentId - component the handler is attached to; required for click and valueChange, rejected otherwise
expression - sandboxed SpEL expression evaluated when the handler runs

public record DynamicViewHandlerDefinition(@Nullable String name, @Nullable DynamicViewHandlerEvent event, @Nullable String componentId, @Nullable String expression) extends Record
Defines a behavior handler of a dynamic view.
  • Constructor Details

    • DynamicViewHandlerDefinition

      public DynamicViewHandlerDefinition(@Nullable String name, @Nullable DynamicViewHandlerEvent event, @Nullable String componentId, @Nullable String expression)
      Creates an instance of a DynamicViewHandlerDefinition record class.
      Parameters:
      name - the value for the name record component
      event - the value for the event record component
      componentId - the value for the componentId record component
      expression - the value for the expression record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public @Nullable String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • event

      public @Nullable DynamicViewHandlerEvent event()
      Returns the value of the event record component.
      Returns:
      the value of the event record component
    • componentId

      public @Nullable String componentId()
      Returns the value of the componentId record component.
      Returns:
      the value of the componentId record component
    • expression

      public @Nullable String expression()
      Returns the value of the expression record component.
      Returns:
      the value of the expression record component