[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:
Victor Woeltjen 2014-12-03 13:44:27 -08:00
parent e04b9828ea
commit 9dd0a54568

View File

@ -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;