/// <summary>
        /// Loads the sub fields.
        /// </summary>
        /// <param name="onSubfieldsLoaded">The on subfields loaded.</param>
        public void LoadSubFields(Action onSubfieldsLoaded)
        {
            Subfields.Clear();

            if (Model == null)
            {
                onSubfieldsLoaded();
                return;
            }

            if (Model.ColumnType == ColumnTypes.Reference || Model.ColumnType == ColumnTypes.MultiReference)
            {
                FieldList.BeginGetCrossReferenceSubfields(
                    Model.DefinedIn,
                    Model.SystemName,
                    (o, result) =>
                        {
                            if (result.Error == null)
                                foreach (var field in result.Object.Where(ParentStepViewModel.CanSelectField))
                                {
                                    var vm = new DisplayListFieldViewModel(field, this);

                                    Subfields.Add(vm);
                                }

                            onSubfieldsLoaded();
                        });

                return;
            }

            if (Model.ColumnType == ColumnTypes.ReverseReference || Model.ColumnType == ColumnTypes.ReverseMultiReference || Model.ColumnType == ColumnTypes.TreeView)
            {
                FieldList.BeginGetReverseCrossReferenceSubfields(
                    Model.DefinedIn,
                    Model.SystemName,
                    (o, result) =>
                        {
                            if (result.Error == null)
                            {
                                foreach (var field in result.Object.Where(ParentStepViewModel.CanSelectField))
                                {
                                    var vm = new DisplayListFieldViewModel(field, this);

                                    Subfields.Add(vm);
                                }
                            }

                            onSubfieldsLoaded();
                        });

                return;
            }

            onSubfieldsLoaded();
        }
 /// <summary>
 /// Creates the field vm.
 /// </summary>
 /// <param name="field">The field.</param>
 /// <param name="parentVM">The parent vm.</param>
 /// <returns>DisplayListFieldViewModel.</returns>
 public DisplayListFieldViewModel CreateFieldVM(FieldInfo field, ProcessFieldDisplayListRequiredStepViewModel parentVM)
 {
     var fieldVM = new DisplayListFieldViewModel(field, parentVM);
     DeploymentService.Container.ComposeParts(fieldVM);
     return fieldVM;
 }