[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();
|
||||
|
||||
// Update all properties
|
||||
properties.forEach(function (property) {
|
||||
var value = formValue[property.getDefinition().key];
|
||||
property.setValue(newModel, value);
|
||||
properties.forEach(function (property, index) {
|
||||
property.setValue(newModel, formValue[index]);
|
||||
});
|
||||
|
||||
return newModel;
|
||||
|
||||
Reference in New Issue
Block a user