com.vaadin.flow.component.internal.

Class UIInternals.JavaScriptInvocation

  • java.lang.Object
    • com.vaadin.flow.component.internal.UIInternals.JavaScriptInvocation
    • Constructor Detail

      • JavaScriptInvocation

        public JavaScriptInvocation(String expression,
                                    Serializable... parameters)

        Creates a new invocation.

        Parameters:

        expression - the expression to invoke

        parameters - a list of parameters to use when invoking the script

      • JavaScriptInvocation

        public JavaScriptInvocation(String expression,
                                    StateNode owner,
                                    Serializable... parameters)

        Creates a new invocation.

        Parameters:

        expression - the expression to invoke

        owner - the state node that this invocation belongs to

        parameters - a list of parameters to use when invoking the script

    • Method Detail

      • getOwner

        public Optional<StateNode> getOwner()

        Gets the state node that this invocation belongs to, if any.

        Returns:

        the optional owner state node, or an empty optional if no state node has been provided for this invocation.

      • 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