You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Frameworks/Vault-Application-Framework/Configuration/Hierarchical-Configuration/index.md
+108Lines changed: 108 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,92 @@ namespace MFVaultApplication1
44
44
}
45
45
{% endhighlight %}
46
46
47
+
## Array Element Guid
48
+
49
+
When working with collections it is important that each collection member has an ID which can be used to subsequently refer to the member. This is used when saving the configuration, for example, to understand what has changed. If you do not include this member then the system may not correctly persist passwords, or may require system-administrator permission to save the configuration, even if only vault-admin level is required for the changed elements.
50
+
51
+
This can be done in two ways: either by adding a member to the class in the collection, or by inheriting from the [ConfigurationCollectionItemBase](https://github.com/M-Files/VAF.Extensions.Community/blob/master/MFiles.VAF.Extensions/Configuration/ConfigurationCollectionItemBase.cs) class in the VAF Extensions library.
52
+
53
+
### Using the VAF Extensions
54
+
55
+
Ensure that your configuration item class inherits from the correct base class:
In the example screenshot above, adding new items to the `Children` collection results in items being added named `ConfigurationChild[1]`, `ConfigurationChild[1]`, etc. In some situations, it is more useful to show a different value for the item name to make locating the correct item more simple.
@@ -79,6 +165,17 @@ namespace MFVaultApplication1
79
165
[DataMember]
80
166
[TextEditor(IsRequired = true)]
81
167
public string Name { get; set; }
168
+
169
+
[DataMember(Name = "arrayElementGuid", EmitDefaultValue = false, Order = 99)]
0 commit comments