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")
)
}
}Content copied to clipboard