loadData

private fun loadData()

Asynchronously fetches the initial values from FormDataManager.initData (in handlerScope) and creates the control states from them.

Every failure ends in FormLoadState.Failed:

  • null from initData is an expected failure (database) that the data manager has already shown;

  • an exception is a bug in the form's code, e.g. InitDataException for data that does not fit the schema, so it goes to the unhandled-error dialog and to the log.