From 415afec335659ca6bc206b34bdd3c2fe4635718f Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 1 Mar 2018 15:19:44 +0100 Subject: KVision site with Jekyll --- .../-form-panel/index.html | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 api/pl.treksoft.kvision.form/-form-panel/index.html (limited to 'api/pl.treksoft.kvision.form/-form-panel/index.html') diff --git a/api/pl.treksoft.kvision.form/-form-panel/index.html b/api/pl.treksoft.kvision.form/-form-panel/index.html new file mode 100644 index 00000000..99e379a8 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form-panel/index.html @@ -0,0 +1,235 @@ + + + +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.

+
+

Companion Object Functions

+ + + + + + + +
+

formPanel

+
+fun <K> Container.formPanel(type: FormType? = null, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K): FormPanel<K> +

DSL builder extension function.

+
+ + -- cgit