[Forms] Initialize model from form value
Correctly initialize domain object model from form value upon domain object creation. Integration of forms component, WTD-593.
This commit is contained in:
@@ -101,9 +101,8 @@ define(
|
|||||||
newModel.type = type.getKey();
|
newModel.type = type.getKey();
|
||||||
|
|
||||||
// Update all properties
|
// Update all properties
|
||||||
properties.forEach(function (property) {
|
properties.forEach(function (property, index) {
|
||||||
var value = formValue[property.getDefinition().key];
|
property.setValue(newModel, formValue[index]);
|
||||||
property.setValue(newModel, value);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return newModel;
|
return newModel;
|
||||||
|
|||||||
Reference in New Issue
Block a user