Dock Panels. Data Relation
This section describes a various Dock Panels use cases and Aplication Model's options to configure this variants.
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 node and select Add|ClassDockPanel from the context menu.
To add Dock Panel to the View or Main Window, perform similar operations at the Views|...|DockPanels or Xafari|DockPanels nodes:
DockPanels|Add context menu lists different variants of the new panel. System will pass the specified value to the RelationType property of the new Dock Panel. Dock Panels for the business class and for the View provide displaying the data based on the Master-Detail relationship between the objects of the General View and the objects of the panel. This behavior as defined by the RelationType property. Available values are listed below:
DockPanel value supports the previous versions, x08 and more earlier. Fore more information refer to the Data Relation (Obsolete) topic.
Independent means that the objects within the General View and the objects within the Dock Panel are displayed independently. To see an example of such a panel, refer to the Getting Started topic. RelationType property shows Independent value, it can't be edited.
View and Guid are required properties. 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.
Master means that the current object on the Dock Panel is a filter for related objects on the General View (i.e. this is a 1:N relationship). The image below shows the Contact General View and the Department_V2 Dock Panel, for the fixed Department object only the related Contact objects are displayed.
The following picture demonstrates Department_V2 Dock Panel node. RelationType property is "Master", MasterObjectsType and DetailsObjectType properties show full type names for related objects. All three properties are informative only and cannot be edited.
The General View will display only those objects that satisfy the RelationCriteria. "Department = ?" criteria selects the required objects in this example. RelationCriteria property is described in details below in the topic.
Details relation type means that the current object on the General View is a filter for related objects on the Dock Panel. The image below shows the Department General View and the Contact_V2 Dock Panel, for the fixed Department object only the related Contact objects are displayed
The following picture demonstrates Contact_V2 Dock Panel node. RelationType property is "Detail", MasterObjectsType and DetailsObjectType properties show full type names for related objects. All three properties are informative only and cannot be edited.
The Dock Panel will display only those objects that satisfy the RelationCriteria. "Department = ?" criteria selects the required objects in this example. RelationCriteria property is described in details below in the topic.
DetailsCurrentObject specifies the situation when a Dock Panel displays the Detail View for the object that is focused on the General List View. The image below shows the Department General List View and the DepartmentDetailsCurrentObject_V2 Dock Panel, the focused Department object is displayed on the Detail View of the Dock Panel.
The following picture demonstrates DepartmentDetailsCurrentObject_V2 Dock Panel node. RelationType property is "DetailsCurrentObject", MasterObjectsType and DetailsObjectType properties are equal.
There are important requirements the View property must satisfy when relation type is DetailsCurrentObject: View can only represent the class specified in the MasterObjectType property, or its ancestor.
RelationCriteria property defines a criteria to select detail-objects for the current master-object. It is necessary for Master and Detail relation types and it significantly expands usage scenarios. RelationCriteria string must satisfies the Criteria Language Syntax and it supports Positional Parameters and Named Parameters. To learn more, refer to the Criteria Language Syntax topic.
If the RelationType is Master, Details or DetailsCurrentObject, then the Dock Panel node encloses Parameters collection (see below).
To specify Named Parameter in criteria, use ?Id expression, where Id is the Id value of the corresponding node in the Parameters collection. It is possible to repeatedly use the same Named Parameter in the criteria. The string below contains RelationCriteria with Named Parameter (Id=Param1):
It is possible to use together both Positional Parameters and Named Parameters.
Each Parameters item exposes the following properties:
RelationCriteria property shows criteria string that is specified in the Dock Panel node.
ExpressionContexType property shows type that is context of the formula specified in Expression property.
Expression property specifies an expression to calculate parameter. Obtained value will be passed to the RelationCriteria property of the Dock Panel node. Expression string must satisfies the Criteria Language Syntax. Expression uses context type from the ExpressionContexType property.
Index property determines the processing order of Positional Parameters. For Named Parameters the Index are skipped.
Id property is used in criteria for Named Parameters.