kvision / pl.treksoft.kvision.form / FieldLabel

FieldLabel

open class FieldLabel : Tag

Helper class for HTML label element.

Constructors

<init>

FieldLabel(forId: String, content: String? = null, rich: Boolean = false, classes: Set<String> = setOf("control-label"))

Inherited Properties

align

var align: Align?

Text align.

content

open var content: String?

Text content of the tag.

rich

open var rich: Boolean

Determines if content can contain HTML code.

template

open var template: ((Any?) -> String)?

Handlebars template.

templates

open var templates: Map<String, (Any?) -> String>

Handlebars templates for i18n.

type

var type: TAG

Tag type.

Functions

getSnAttrs

open fun getSnAttrs(): List<StringPair>

Returns list of element attributes in the form of a List.

Inherited Functions

getSnClass

open fun getSnClass(): List<StringBoolPair>

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

render

open fun render(): VNode

Renders current component as a Snabbdom vnode.

unaryPlus

operator fun String.unaryPlus(): Unit

Companion Object Functions

fieldLabel

fun Container.fieldLabel(forId: String, content: String? = null, rich: Boolean = false, classes: Set<String> = setOf("control-label"), init: (FieldLabel.() -> Unit)? = null): FieldLabel

DSL builder extension function.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

setData

fun <K> Template.setData(obj: K, serializer: SerializationStrategy<K>): Unit
fun <K : Any> Template.setData(obj: K): Unit

Extension function to set serializable object as a template data.