bindTo

@CheckReturnValue
abstract fun bindTo(handlerName: String, userData: List<Any?>): ModalBuilder(source)
@CheckReturnValue
fun bindTo(handlerName: String, vararg userData: Any?): ModalBuilder(source)

Binds the action to a @ModalHandler with its arguments.

Return

This builder for chaining convenience

Parameters

handlerName

The name of the modal handler, which must be the same as your @ModalHandler

userData

The optional user data to be passed to the modal handler via @ModalData


@CheckReturnValue
fun bindTo(handler: Consumer<ModalEvent>): ModalBuilder(source)

Binds the action to the consumer.

Return

This builder for chaining convenience

Parameters

handler

The modal handler to run when the modal is used


abstract fun bindTo(handler: suspend (ModalEvent) -> Unit): ModalBuilder(source)

Binds the action to the closure.

Return

This builder for chaining convenience

Parameters

handler

The modal handler to run when the modal is used