From 7c2850063697f94a0d8b8d8f8588136dd4b3d05e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 21 Oct 2018 23:59:34 +0200 Subject: API documentation for KVision 0.0.19 --- api/pl.treksoft.kvision.form/-form/index.html | 143 -------------------------- 1 file changed, 143 deletions(-) delete mode 100644 api/pl.treksoft.kvision.form/-form/index.html (limited to 'api/pl.treksoft.kvision.form/-form/index.html') diff --git a/api/pl.treksoft.kvision.form/-form/index.html b/api/pl.treksoft.kvision.form/-form/index.html deleted file mode 100644 index 693f2c30..00000000 --- a/api/pl.treksoft.kvision.form/-form/index.html +++ /dev/null @@ -1,143 +0,0 @@ - - - -Form - kvision - - - -kvision / pl.treksoft.kvision.form / Form
-
-

Form

-class Form<K : Any> -

The form definition class. Can be used directly or indirectly inside a FormPanel.

-

Constructors

- - - - - - - -
-

<init>

-
-Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>) -

Creates a form with a given modelFactory function

-
-

Functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

add

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

Adds a string control to the form.

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

Adds a boolean control to the form.

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

Adds a number control to the form.

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

Adds a date control to the form.

-fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> -

Adds a files control to the form.

-
-

clearData

-
-fun clearData(): Unit -

Sets the values of all controls to null.

-
-

get

-
-operator fun get(key: KProperty1<K, *>): Any? -

Returns a value of the control of given key.

-
-

getControl

-
-fun getControl(key: KProperty1<K, *>): FormControl? -

Returns a control of given key.

-
-

getData

-
-fun getData(): K -

Returns current data model.

-
-

getDataJson

-
-fun getDataJson(): Json -

Returns current data model as JSON.

-
-

remove

-
-fun remove(key: KProperty1<K, *>): Form<K> -

Removes a control from the form.

-
-

removeAll

-
-fun removeAll(): Form<K> -

Removes all controls from the form.

-
-

setData

-
-fun setData(model: K): Unit -

Sets the values of all the controls from the model.

-
-

validate

-
-fun validate(): Boolean -

Invokes validator function and validates the form.

-
-

Companion Object Functions

- - - - - - - -
-

create

-
-fun <K : Any> create(panel: FormPanel<K>? = null, init: Form<K>.() -> Unit = null): Form<K>
- - -- cgit