add

open fun <C : FormControl> add(key: String, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a form control to the form panel bound to a dynamic field type.

Parameters

key

key identifier of the control

control

the form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open override fun add(child: Component)

Adds given component to the current container.

Parameters

child

child component


open fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a string control to the form panel.

Parameters

key

key identifier of the control

control

the string form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a boolean control to the form panel.

Parameters

key

key identifier of the control

control

the boolean form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : TriStateFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a nullable boolean control to the form panel.

Parameters

key

key identifier of the control

control

the boolean form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a number control to the form panel.

Parameters

key

key identifier of the control

control

the number form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : DateFormControl> add(key: KProperty1<K, <Error class: unknown class>?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a date control to the form panel.

Parameters

key

key identifier of the control

control

the date form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : KFilesFormControl> add(key: KProperty1<K, List<<Error class: unknown class>>?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null)

Adds a files control to the form panel.

Parameters

key

key identifier of the control

control

the files form control

required

determines if the control is required

requiredMessage

optional required validation message

legend

put this control inside a fieldset with given legend

validatorMessage

optional function returning validation message

validator

optional validation function