User interface class.
Library: dataccess
The repository keeps track of all available data-sources. It can be used to find a data-source given its name or to enumerate all data-sources. For a more advanced usage, it can be used to subscribe a graphic object to a data-source. This may be useful when designing new graphic classes that need to be data-source aware.
About subscription A graphic object can subscribe itself to a data source name so that when a data source with that name becomes available, the graphic object will be notified. Similarly, if or when the data source is no longer available the graphic object will also be notified.
- See also
- IliDataSource, IliDataSourceCallback
Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\nThis class defines the following accessors:
Method accessors
[getDataSource] The near parameter can be:
-
A container (
IlvContainer
): A data source within the scope of the container is searched for.
-
An graphic object (
IlvGraphic
): A data source within the scope of the holder (container or manager) in which this graphic object is located is searched for.
-
null:
A global data source located in any container or manager is searched for.
Note that following Rogue Wave Views terminology, the holder of a graphic object designates the container or manager in which the graphic object is located.
The data source is searched for according to the following rules:
-
Same holder: If a data source named name exists in the same holder as the near parameter, this data source is returned. The scope of the data source can be local or global.
-
Same scope class: If the near parameter is a graphic located in a container or if it is itself a container and this container has been assigned a scope class, all containers with the same scope class are considered (see the
IliRepository.setScopeClass()
function). If a data-source named name exists in any of these containers, this data source is returned. The scope of the data source can be local or global. If more than one data source matches, one is picked at random and returned.
-
Same container hierarchy: If the near parameter is a graphic object located in a holder, if it is a holder and the holder is contained in another holder, or if it contains other holders (this situation occurs when you use an
IlvNotebook
gadget: each notebook page contains a container), all containers and managers related directly or indirectly to the holder via the containment relation are considered. If a data source named name exists in any of of the holders, the data source is returned. The scope of the data source can be local or global. If more than one data source matches, one is picked at random and returned.
-
Global scope: If a global data source named name exists, this data source is returned. The scope of the data source must be global. If more than one data source matches, one is picked at random and returned.
-
Otherwise, the function
IliRepository.getDataSource()
returns null
.