FormSchemaBuilder

abstract class FormSchemaBuilder

Abstract factory for form schemas.

Every form has its own builder implementation, which defines the structure of its controls, their order and their configuration for the given business domain.

Example implementation:

class UserFormSchemaBuilder : FormSchemaBuilder() {
override fun build(): FormSchema {
return FormSchema(
controls = mapOf(
"name" to StringControl(label = "Name", required = true),
"email" to StringControl(label = "Email")
),
contentOrder = listOf("name", "email"),
actionBarOrder = listOf("save", "cancel")
)
}
}

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun defineContentOrder(): List<String>
Link copied to clipboard
abstract fun defineControls(): Map<String, Control<*>>