For example, consider a class that has one choice field and one relation field. The first field, named classField, is a CHOICE field that offers two options whose names are those of classes of the data model, Class1 and Class2. The second field, named objectField, is a RELATION field that has two target classes, Class1 and Class2.
<CHOICE id="classField">
[...]
<OPTIONS>
<OPTION id="optionClass1" name="Name of the class Class1"/>
<OPTION id="optionClass2" name="Name of the class Class2"/>
</OPTIONS>
[...]
</CHOICE>
<RELATION id="objectField">
[...]
<CLASSES idrefs="Class1 Class2"/>
<CLASS_FIELD idref="classField"/>
[...]
</RELATION>
The class field defined inside the objectField field ensure that only objects that belong to the selected class in the classField field are offered to selection to the user.
|