With Angular and on iOS, when I use metadata in a form that does not have groups, I can just use:
<
RadDataForm
[source]="model" [metadata]="metadata"></
RadDataForm
>
However, if I want to use groups, I'm required to add group tags to the form:
<
RadDataForm
[source]="model" [metadata]="metadata">
<
TKPropertyGroup
tkDataFormGroups
collapsible
=
"false"
name
=
"Stuff"
hidden
=
"false"
></
TKPropertyGroup
>
</
RadDataForm
>
In my metadata, I add fields to the group like this:
{
name:
"name"
,
displayName:
"Name"
,
hintText:
"Name"
,
groupName:
"Main Info"
,
index: 0,
editor:
"Text"
,
},
This does not work. I get an exception: TypeError: undefined is not an object (evaluating 'group.properties.length')
I need to add properties to the group in the XML:
<
RadDataForm
[source]="model" [metadata]="metadata">
<
TKPropertyGroup
tkDataFormGroups
collapsible
=
"false"
name
=
"Stuff"
hidden
=
"false"
>
<
TKEntityProperty
tkPropertyGroupProperties
name
=
"name"
></
TKEntityProperty
>
</
TKPropertyGroup
>
</
RadDataForm
>
While this works, it means I have to use a very different technique when I have groups than when I don't. Further, I have to duplicate the information about the properties in both the XML and the JSON metadata. This makes maintenance much more difficult.
It would be very, very nice if you could specify the groups in the metadata. If that isn't possible, it would be nice to be able to just specify the groups in XML and add the properties in metadata.
Finally, it would also be extremely useful if you could specify the validators in the metadata. Currently, the only way I can find to add validators to a form is with XML. I haven't figured out how to add them programmatically or with metadata.