From d8cd67062b8de6e8398dc6dfd00d201200c82414 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 9 Feb 2018 13:40:35 +0100 Subject: API doc and readme --- .../-form-panel/index.html | 221 +++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 docs/api/pl.treksoft.kvision.form/-form-panel/index.html (limited to 'docs/api/pl.treksoft.kvision.form/-form-panel/index.html') diff --git a/docs/api/pl.treksoft.kvision.form/-form-panel/index.html b/docs/api/pl.treksoft.kvision.form/-form-panel/index.html new file mode 100644 index 00000000..3a853e3d --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form-panel/index.html @@ -0,0 +1,221 @@ + + + +FormPanel - kvision + + + +kvision / pl.treksoft.kvision.form / FormPanel
+
+

FormPanel

+open class FormPanel<K> : SimplePanel +

Bootstrap form component.

+

Constructors

+ + + + + + + +
+

<init>

+
+FormPanel(type: FORMTYPE? = null, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K)
+

Properties

+ + + + + + + + + + + +
+

validator

+
+var validator: (Form<K>) -> Boolean? +

Validation function.

+
+

validatorMessage

+
+var validatorMessage: (Form<K>) -> String? +

Function returning validation message.

+
+

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

add

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

Adds a control to the form panel.

+
+

clearData

+
+open fun clearData(): Unit +

Sets the values of all controls to null.

+
+

get

+
+operator fun get(key: String): Any? +

Returns a value of the control of given key.

+
+

getControl

+
+open fun getControl(key: String): FormControl? +

Returns a control of given key.

+
+

getData

+
+open fun getData(): K +

Returns current data model.

+
+

getDataJson

+
+open fun getDataJson(): Json +

Returns current data model as JSON.

+
+

getSnClass

+
+open fun getSnClass(): List<StringBoolPair> +

Returns list of CSS class names for current widget in the form of a List.

+
+

remove

+
+open fun remove(key: String): FormPanel<K> +

Removes a control from the form panel.

+
+

removeAll

+
+open fun removeAll(): FormPanel<K> +

Removes all children from the current container.

+
+

render

+
+open fun render(): VNode +

Renders current component as a Snabbdom vnode.

+
+

setData

+
+open fun setData(model: K): Unit +

Sets the values of all the controls from the model.

+
+

validate

+
+open fun validate(): Boolean +

Invokes validator function and validates the form.

+
+

Inherited Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

add

+
+open fun add(child: Component): SimplePanel +

Adds given component to the current container.

+
+

addAll

+
+open fun addAll(children: List<Component>): SimplePanel +

Adds a list of components to the current container.

+
+

addInternal

+
+fun addInternal(child: Component): SimplePanel +

Protected and final method to add given component to the current container.

+
+

childrenVNodes

+
+open fun childrenVNodes(): Array<VNode> +

Returns the array of the children Snabbdom vnodes.

+
+

getChildren

+
+open fun getChildren(): List<Component> +

Returns a list of children of the current container.

+
+

remove

+
+open fun remove(child: Component): SimplePanel +

Removes given component from the current container.

+
+ + -- cgit