Updated some of the property editor API to ensure that when formatting data for persistence we have access to the pre-values as well since these might need to be used to format the persisted data. Completed the new property editor: Multiple text box and it is saving the data in a backwards compatible format. Changed the internal AsDictionary method of the pre value collection to be a public method called FormatAsDictionary.
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
//set up the defaults
|
||||
var dataTypeService = _dataTypeService.Value;
|
||||
var preVals = dataTypeService.GetPreValuesCollectionByDataTypeId(source.Id);
|
||||
IDictionary<string, object> dictionaryVals = PreValueCollection.AsDictionary(preVals).ToDictionary(x => x.Key, x => (object)x.Value);
|
||||
IDictionary<string, object> dictionaryVals = preVals.FormatAsDictionary().ToDictionary(x => x.Key, x => (object)x.Value);
|
||||
var result = Enumerable.Empty<PreValueFieldDisplay>().ToArray();
|
||||
|
||||
//if we have a prop editor, then format the pre-values based on it and create it's fields.
|
||||
|
||||
Reference in New Issue
Block a user