Class UIInternals.JavaScriptInvocation

java.lang.Object
com.vaadin.flow.component.internal.UIInternals.JavaScriptInvocation
All Implemented Interfaces:
Serializable
Enclosing class:
UIInternals

public static class UIInternals.JavaScriptInvocation extends Object implements Serializable
A Page.executeJs(String, Object...) invocation that has not yet been sent to the client.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavaScriptInvocation(@Nullable JsCall jsCall, String expression, Object... parameters)
    Creates a new invocation for the given call, whose expression and parameters the caller has already resolved.
    JavaScriptInvocation(String expression, Object... parameters)
    Creates a new invocation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the JavaScript expression to invoke.
    @Nullable JsCall
    Gets the call that this invocation performs, for a caller that acts on the invocation instead of running its JavaScript — the client, which looks up the generated function rather than compiling the expression, and a driver of the client side that recognizes the call.
    Gets the parameters to use when invoking the script.

    Methods inherited from class java.lang.Object

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

    • JavaScriptInvocation

      public JavaScriptInvocation(String expression, Object... parameters)
      Creates a new invocation.
      Parameters:
      expression - the expression to invoke
      parameters - a list of parameters to use when invoking the script
      Since:
      25.0
    • JavaScriptInvocation

      public JavaScriptInvocation(@Nullable JsCall jsCall, String expression, Object... parameters)
      Creates a new invocation for the given call, whose expression and parameters the caller has already resolved.
      Parameters:
      jsCall - the call that this invocation performs, or null if the invocation is plain JavaScript
      expression - the expression to invoke
      parameters - a list of parameters to use when invoking the script
      Since:
      25.4
  • Method Details

    • getExpression

      public String getExpression()
      Gets the JavaScript expression to invoke.
      Returns:
      the JavaScript expression
    • getParameters

      public List<Object> getParameters()
      Gets the parameters to use when invoking the script.
      Returns:
      a list of parameters to use
    • getJsCall

      public @Nullable JsCall getJsCall()
      Gets the call that this invocation performs, for a caller that acts on the invocation instead of running its JavaScript — the client, which looks up the generated function rather than compiling the expression, and a driver of the client side that recognizes the call.
      Returns:
      the call, or null if the invocation is plain JavaScript scheduled with an expression
      Since:
      25.4