bind

open fun <C : FormControl> C.bind(key: String, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a control to the form panel with a dynamic key.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : StringFormControl> C.bind(key: KProperty1<K, String?>, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a string control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : BoolFormControl> C.bind(key: KProperty1<K, Boolean?>, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a boolean control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : TriStateFormControl> C.bind(key: KProperty1<K, Boolean?>, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a nullable boolean control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : NumberFormControl> C.bind(key: KProperty1<K, Number?>, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a number control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


open fun <C : DateFormControl> C.bind(key: KProperty1<K, <Error class: unknown class>?>, required: Boolean = false, requiredMessage: String? = null, layoutType: FormType? = null, validatorMessage: (C) -> String?? = null, validator: (C) -> Boolean?? = null): C

Bind a date control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function


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

Bind a files control to the form panel.

Return

the control itself

Parameters

key

key identifier of the control

required

determines if the control is required

requiredMessage

optional required validation message

layoutType

style control for given form layout

validatorMessage

optional function returning validation message

validator

optional validation function