From 12d2bd198c9ff5cb197e50da2d024a2418b8ee36 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 2 Jun 2018 00:47:15 +0200 Subject: Upgrade to 0.0.13 --- api/pl.treksoft.kvision.form/-form/index.html | 29 +++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (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 index 47af0804..f34e7aea 100644 --- a/api/pl.treksoft.kvision.form/-form/index.html +++ b/api/pl.treksoft.kvision.form/-form/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form / Form

Form

-class Form<K> +class Form<K : Any>

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

Constructors

@@ -18,7 +18,7 @@

<init>

@@ -38,9 +38,9 @@

Adds a boolean control to the form.

fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, 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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +fun <C : KDateFormControl> add(key: KProperty1<K, KDate?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>

Adds a date control to the form.

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

Adds a files control to the form.

@@ -64,6 +64,15 @@ + + + +
-Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K) +Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>)

Creates a form with a given modelFactory function

+

getContent

+
+suspend fun getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile +

Returns file with the content read.

+

getControl

@@ -127,5 +136,17 @@
+

Companion Object Functions

+ + + + + + + +
+

create

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