java.lang.Object
com.vaadin.flow.component.trigger.internal.Action
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClipboardReadAction, PromiseAction, SetPropertyAction

public abstract class Action extends Object implements Serializable
Something that runs on the client when a Trigger fires. Subclasses append the JS that runs when the trigger fires by overriding appendStatement(JsBuilder, StringBuilder).

Actions can take their value either from server-side literals or from an Action.Input — a deferred value expression evaluated in the trigger's handler scope at fire time. A Trigger may expose its own state as one or more Inputs (for example ClickTrigger.screenX()); other subclasses of Input read state independent of any trigger (for example PropertyInput).

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

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A value an Action consumes at fire time — a deferred JS expression that yields a value when the surrounding trigger fires.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    appendStatement(com.vaadin.flow.component.trigger.internal.JsBuilder builder, StringBuilder out)
    Appends this action's JS statement to out.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Action

      public Action()
  • Method Details

    • appendStatement

      protected abstract void appendStatement(com.vaadin.flow.component.trigger.internal.JsBuilder builder, StringBuilder out)
      Appends this action's JS statement to out. Element references must go through JsBuilder.reference(com.vaadin.flow.dom.Element).
      Parameters:
      builder - collects element parameter references, not null
      out - buffer to append into, not null