setCustomValuesFromMap

fun setCustomValuesFromMap(model: Model, customValues: Map<String, Any>)

Sets @Custom values of a Model using name->value pairs in customValues. In the simplest case, the key to customValues is a field name. However, it may also be a path to a field, such as foo.bar.baz. In which case, we need to set the field baz on model.foo.bar

In this context a field can be a simple java field, or a getter i.e. a method in the form :

fun getFieldname() : FieldType

Also, the field does NOT have to be mutable, as long as there is a copy method which creates a new instance. Using our foo.bar.baz example, if baz is read-only, but bar has a method in the form :

fun baz( value : BazType ) : BarType

Then we call baz( value ), and then set foo.bar with the returned value. Note, bar may be a simple field, or a simple getter/setter, but is may ALSO have a copy method.