Class Action.Input<T>

java.lang.Object
com.vaadin.flow.component.trigger.internal.Action.Input<T>
Type Parameters:
T - the runtime type of the value produced
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ImageBlobInput, LiteralInput, PropertyInput, SignalInput
Enclosing class:
Action

public abstract static class Action.Input<T> extends Object implements Serializable
A value an Action consumes at fire time. Renders into a JsFunction that, when called, evaluates to the input's value — a literal, the current value of a DOM property, an event-scoped expression, anything the producer chooses.

Some inputs are bound to a specific trigger's handler scope (see HandlerInput) and may only be used in actions wired to that trigger; others are independent of any trigger (see PropertyInput, LiteralInput) and may be used freely.

For internal use only. May be renamed or removed in a future release.

See Also:
  • Constructor Details

    • Input

      public Input()
  • Method Details

    • toJs

      protected abstract JsFunction toJs(Trigger trigger)
      Builds the JsFunction that yields this input's value when called. The function may take event as a runtime argument (declared by the subclass via JsFunction.withArguments(String...)); inputs that don't need event simply omit the declaration and ignore the argument the caller passes.
      Parameters:
      trigger - the surrounding trigger this render is for, not null
      Returns:
      the input's JS function, not null