From 12d2bd198c9ff5cb197e50da2d024a2418b8ee36 Mon Sep 17 00:00:00 2001
From: Robert Jaros Creates a form with a given modelFactory function
-
+ Constructor
<init>
-
-Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K)
+
+Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>)
Parameters
panel - optional instance of FormPanelmodelFactory - function transforming a Map<String, Any?> to a data model of class Kserializer - a serializer for model type
Creates a form with a given modelFactory function
inline fun <reified K : Any> create(panel: FormPanel<K>? = null, noinline init: Form<K>.() -> Unit = null): Form<K>
+diff --git a/api/pl.treksoft.kvision.form/-form/add.html b/api/pl.treksoft.kvision.form/-form/add.html index 2980cadf..ee324f93 100644 --- a/api/pl.treksoft.kvision.form/-form/add.html +++ b/api/pl.treksoft.kvision.form/-form/add.html @@ -56,8 +56,8 @@ current form
validator- optional validation function
Return
current 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.
@@ -72,8 +72,8 @@ current form
validator- optional validation function
Return
current 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.
diff --git a/api/pl.treksoft.kvision.form/-form/create.html b/api/pl.treksoft.kvision.form/-form/create.html new file mode 100644 index 00000000..6db5df89 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/create.html @@ -0,0 +1,14 @@ + +
+ +
+ + +
+