Dock Panels. Data Relation (Obsolete)

The Dock Panel may accompany a specific View, business class or main window.

To add Dock Panel to the business class, invoke the Model Editor, navigate to the corresponding BOModel|Class|DockPanels and select Add|ClassDockPanel from the context menu.

dock_panels_8

Dock Panels for the View and the main window are added in a similar way to the Views|...|DockPanels and Xafari|DockPanels nodes:

dock_panels_9

There are two required parameters in the Dock Panel node, this is View and Guid.

dock_panels_10

The specified View will be displayed within the Dock Panel.

Guid is a unique identifier, it is important that all Dock Panels in the application had different identifiers.

Dock Panels for business class and for View provide displaying the data based on the Master-Detail relationship between the objects of the main General View and the objects of the panel. This feature is provided by the RelationType and RelationCriteria properties.

dock_panels_11

There are four valid values for RelationType, it's Independent, Master, Details, DetailsCurrentObject. The Master and Detail values necessarily require to set RelationCriteria property.

Note

In this topic, RelationCriteria property needs the Xafari Object Formatter syntax. Starting with the x010 version and further, Expressions syntax is available, see the Data Relation topic for details.

  • Independent means that the objects within the General View and the objects within the Dock Panel are displayed independently. Independent is the default value for the RelationType property. All Dock Panels placed in the Xafari|DockPanels  node are always working in the Independent mode.
  • Master means that the current object within the Dock Panel is a filter for related objects within the General View. The General View will display only those objects that satisfy the RelationCriteria. The image below shows the Contact General View and the Department Dock Panel, for the fixed Department object only the related Contact objects are displayed. RelationCriteria property specifies the condition for filtering the associated objects, the condition uses the Object Formatter syntax. In this example, RelationCriteria property is "Department.Oid = '{0:Oid}'".

dock_panels_12

  • Details means that the current object within the General View is a filter for related objects within the Dock Panel. The Dock Panel will display only those objects that satisfy the RelationCriteria. The image below shows the Department General View and the Contact Dock Panel, for the fixed Department object only the related Contact objects are displayed. RelationCriteria property specifies the condition for filtering the associated objects, the condition uses the Object Formatter syntax. In this example, RelationCriteria property is "Department.Oid = '{0:Oid}'".

dock_panels_13

  • DetailsCurrentObject specifies the situation when a Dock Panel displays the Detail View for the object that is selected within the General List View. The image below shows the Department General List View and the Department Dock Panel, the selected Department object is displayed within the Detail View of the Dock Panel.

dock_panels_14