Multiple Selection

Multiple Selection is a mechanism that allows you to quickly create and efficiently use finite sets of objects of a given type (Selections). The main task which requires Multiple Selection is using the Selections for filtering of data of any volume at high performance.

Let’s examine a simple abstract example. Suppose, we have 3 sets of objects: A, B, and C, all of which are of a significant volume (more than 1,000,000 units.). Each object of the set A has a reference to the object from the set B and a reference to the object from the set C.


Then, suppose that some limited subsets B' and C' are determined in the sets B and C. The task is to filter out only those elements of the set A which contain references to the objects of both B' and C' sets.


The example below will illustrate how the mechanism of Multiple Selection allows you to solve this problem quickly and flexibly in XAF application. Each subset (Selection) is the object of the ObjectSet <T> type which is called Selection Object. These objects, on the one hand, provide ready mechanisms for Selection editing, and on the other hand, they build efficient queries based on the Selection. You can create, edit and store any number of filters based on different Selections.

There are two ways to determine the Selection: static and dynamic. A static method means that it is necessary to specify explicitly the list of objects. A dynamic method allows you to  use criteria: objects that satisfy the criterion will be in the Selection.

Xafari framework provides developers with tools that allow you to differentiate Selections based on the following factors:

  • a set of modules added to the application
  • application user
  • local context
  • instance of an owner object (filter)

To learn more about the Multiple Selection, refer to the following topics: