From c9f98dfdbdc3f56553b58dc226b3f841189d0fc0 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 7 Mar 2018 13:46:10 +0100 Subject: API documentation update --- api/pl.treksoft.kvision.form/-form/add.html | 56 ++++++++++++++++++++-- .../-form/get-control.html | 4 +- api/pl.treksoft.kvision.form/-form/get.html | 4 +- api/pl.treksoft.kvision.form/-form/index.html | 16 +++++-- api/pl.treksoft.kvision.form/-form/remove.html | 4 +- 5 files changed, 69 insertions(+), 15 deletions(-) (limited to 'api/pl.treksoft.kvision.form/-form') diff --git a/api/pl.treksoft.kvision.form/-form/add.html b/api/pl.treksoft.kvision.form/-form/add.html index c17affd8..13098c33 100644 --- a/api/pl.treksoft.kvision.form/-form/add.html +++ b/api/pl.treksoft.kvision.form/-form/add.html @@ -8,14 +8,62 @@ kvision / pl.treksoft.kvision.form / Form / add

add

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

Adds a control to the form.

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

Adds a string control to the form.

Parameters

key - key identifier of the control

-control - the form control

+control - the string form control

+

+required - determines if the control is required

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

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

Adds a boolean control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the boolean form control

+

+required - determines if the control is required

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current 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.

+

Parameters

+

+key - key identifier of the control

+

+control - the number form control

+

+required - determines if the control is required

+

+validatorMessage - optional function returning validation message

+

+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> +

Adds a date control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the date form control

required - determines if the control is required

diff --git a/api/pl.treksoft.kvision.form/-form/get-control.html b/api/pl.treksoft.kvision.form/-form/get-control.html index 66a7180a..83ad285f 100644 --- a/api/pl.treksoft.kvision.form/-form/get-control.html +++ b/api/pl.treksoft.kvision.form/-form/get-control.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / Form / getControl

getControl

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

Returns a control of given key.

Parameters

diff --git a/api/pl.treksoft.kvision.form/-form/get.html b/api/pl.treksoft.kvision.form/-form/get.html index 0a7b70fb..e03bdc45 100644 --- a/api/pl.treksoft.kvision.form/-form/get.html +++ b/api/pl.treksoft.kvision.form/-form/get.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / Form / get

get

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

Returns a value of the control of given key.

Parameters

diff --git a/api/pl.treksoft.kvision.form/-form/index.html b/api/pl.treksoft.kvision.form/-form/index.html index 678f3d2b..8686b022 100644 --- a/api/pl.treksoft.kvision.form/-form/index.html +++ b/api/pl.treksoft.kvision.form/-form/index.html @@ -32,8 +32,14 @@

add

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

Adds a control to the form.

+fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, 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, 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, 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> +

Adds a date control to the form.

@@ -50,7 +56,7 @@

get

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

Returns a value of the control of given key.

@@ -59,7 +65,7 @@

getControl

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

Returns a control of given key.

@@ -86,7 +92,7 @@

remove

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

Removes a control from the form.

diff --git a/api/pl.treksoft.kvision.form/-form/remove.html b/api/pl.treksoft.kvision.form/-form/remove.html index 4a410154..8fa37f2c 100644 --- a/api/pl.treksoft.kvision.form/-form/remove.html +++ b/api/pl.treksoft.kvision.form/-form/remove.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / Form / remove

remove

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

Removes a control from the form.

Parameters

-- cgit