tornadofx / tornadofx / ViewModel / commit

commit

fun commit(vararg fields: ObservableValue<*>, successFn: () -> Unit = {}): Boolean

fun commit(force: Boolean = false, focusFirstError: Boolean = true, vararg fields: ObservableValue<*>, successFn: () -> Unit = {}): Boolean

Perform validation and flush the values into the source object if validation passes.

Optionally commit only the passed in properties instead of all (default).

Parameters

force - Force flush even if validation fails