ILcdSelection allows you to select domain objects from a model that is contained in a layer. If the layer is shared by multiple view objects, the selection is visible in all views. It is often not possible to share a layer between different view objects, however. For example, you cannot share a a layer between views if one view is graphical and another is tabular, or when a model is shared between different layers, each with a distinct representation of the objects within the model.

Consider the case in which multiple views share the same ILcdModel, but do not share the layer that contains the model. If a change in selection occurs in one of the layers, all layers containing the same model should be notified of the change and the method selectObject must be called on these layers to synchronize the selection.

The utility class TLcdSelectionMediator provides a convenient way to handle selection among distinct ILcdLayered (or view) objects. You need to initialize the class with two arrays of ILcdLayered objects. One array acts as a master or source and contains all the ILcdLayered objects that listen to selection changes in the ILcdLayer objects it contains. The other array acts as a slave and contains all the ILcdLayered objects that should be synchronized upon a selection change in one of the master objects. The selection of a layer that belongs to a slave ILcdLayered is updated if that layer refers to the same ILcdModel.