--
PedroRio - 02 Mar 2011
Attribute Object Collection (bridge)
Attribute Object Collections allow to establish a 1:N relationship with a given type of XEO Model (or Models). The specific options for this type of attribute are explained bellow:
Type
The target XEO Model of the relation. If you want to relate to several types of objects, use the generic boObject as the type and see the "Objects" options bellow.
Min Occurs
The minimum number of instances that must be in the relation (values are positive integers plus zero, the default)
Max Occurs
The maximum number of instances that can be in the relation (Values are integers from 1 to any, or "N" to represent "no limit", which is the default)
Whether the parent attribute of a given instance is set to the current instance when adding that instance to this collection.
Orphan Relation
Whether the relation between the two instances is an orphan relation (default is true).
Objects
This option is only applicable when the
Type option is
boObject. This options allows you to choose a subset of the XEO Models in your application whose instances may be in this collection. You can, for example, choose two Object Models (A and B) and the visual components that represents a collection (typically a
xeo:bridge component) will adapt to allow you only to add instances of Object Models A and B. See also the Object Filters section bellow to know how to filter the objects that can be added to the collection. In the following figure an example setting of the Objects option is depicted.
Figure ObjCol.1 - Objects in Collection (in red the type is boObject as explained before and the list is in the "Objects" section)
_
Object Filters
This option is only applicable when the
Objects option has values. It allows you to filter the list of instances that will appear in the lookup window when adding a new instance to the collection, of a given XEO Model.
If in the Objects option you have two XEO Models, (A and B), you can have filters to apply to both of them, so that only instances that match the filter are added. Filters are done using XEOQL (BOQL) expressions.
You can use static expressions like "select A where title like 'A%' or you can use Java code to dynamically create the XEOQL expression to be used in the filtering.
An example is depicted in figure
ObjCol.2
Figure ObjCol.2 - Object Filter editing in XEO Studio
_