FileSelectionBaseComponent

abstract class FileSelectionBaseComponent

This abstract class is the base configuration for file inputs. It has two specific implementations:

Both specific implementations only differ in their rendering implementation, but share the same configuration options, like creating a button which has the same options like a pushButton.

Much more important are the configuration functions. You can configure the following aspects:

This can be done within a functional expression that is the last parameter of the two files functions, called `build`. It offers an initialized instance of this FileSelectionBaseComponent class as receiver, so every mutating method can be called for configuring the desired state for rendering the button.

The following example shows the usage (SingleFileSelectionComponent):

file {
accept("application/pdf")
button({
background { color { info } }
}) {
icon { fromTheme { document } }
text("Accept only pdf files")
}
}

Constructors

Link copied to clipboard
fun FileSelectionBaseComponent()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun accept(value: String)
fun accept(value: Flow<String>)
Link copied to clipboard
open fun button(    styling: BasicParams.() -> Unit = {},     baseClass: StyleClass = StyleClass.None,     id: String? = null,     prefix: String = "file-button",     build: PushButtonComponent.() -> Unit = {})
Link copied to clipboard
fun encoding(value: String)

Properties

Link copied to clipboard
val base64: FileReadingStrategy
Link copied to clipboard
Link copied to clipboard
val plainText: (String) -> FileReadingStrategy

Inheritors

Link copied to clipboard
Link copied to clipboard