BaseDetailV2 schema
BaseDetailV2
is the base detail schema. Provides base logic for detail data initialization and detail interaction with the record page Implemented in the NUI
package. This is a view model schema. Learn more about the schema properties in a separate article: Client schema. Detail schemas must inherit the BaseDetailV2
schema.
Messages
Base detail messages
Name | Mode | Direction | Description |
---|---|---|---|
| Address | Publishing | Returns the record page status. |
| Address | Publishing | Informs of record page changes. |
| Address | Publishing | Informs the record page of the requirement to save the data. |
| Address | Publishing | Informs the record page of detail data changes. |
| Address | Subscription | Subscribes to record page updates. |
| Address | Publishing | Opens the record page. |
| Address | Publishing | Returns the requested column values. |
| Address | Publishing | Changes the value of the record page model. |
| Address | Publishing | Requests the main record entity data. |
The Terrasoft.core.enums.MessageMode
enumeration represents the message modes, and the Terrasoft.core.enums.MessageDirectionType
enumeration represents the message directions. Learn more about the MessageMode
enumeration in the JS class library. Learn more about the MessageDirectionType
enumeration in the JS class library.
Attributes
CanAdd BOOLEAN
The flag that enables data addition.
CanEdit BOOLEAN
The flag that enables data editing.
CanDelete BOOLEAN
The flag that enables data deletion.
Collection COLLECTION
The data collection of the detail.
Filter CUSTOM_OBJECT
The detail filter. Required to filter the detail data.
DetailColumnName STRING
The name of the column by which to filter the data.
MasterRecordId GUID
The parent record key value.
IsDetailCollapsed BOOLEAN
The flag that collapses the detail.
DefaultValues CUSTOM_OBJECT
The default model column values.
Caption STRING
The detail title.
The Terrasoft.core.enums.DataValueType
enumeration represents the attribute data types. Learn more about the DataValueType
enumeration in the JS class library.
Methods
init(callback, scope)
Initializes the detail page.
Parameters
callback | The callback function. |
scope | The method execution context. |
initProfile
Initializes the schema profile. Set to Terrasoft.emptyFn
by default.
initDefaultCaption()
Sets the default detail title.
initDetailOptions()
Initializes the collection of list view data.
subscribeSandboxEvents()
Subscribes to messages required for the detail to operate as intended.
getUpdateDetailSandboxTags()
Generates a tag array for the UpdateDetail
message.
updateDetail
Updates the detail based on the passed parameters. Set to Terrasoft.emptyFn
by default.
Parameters
config | Configuration object that contains the detail properties. |
initData(callback, scope)
Initializes the collection of list view data.
Parameters
callback | The callback function. |
scope | The method execution context. |
getEditPageName()
Returns the record page name based on the type of selected record (when editing) or the selected type of record to add (when adding).
onDetailCollapsedChanged(isCollapsed)
Detail expansion or collapse handler.
Parameters
isCollapsed | Flag that collapses the detail. |
getToolsVisible()
Returns the detail collapse value.
getDetailInfo()
Publishes the message for retrieving data about the detail.
Array of modifications
In base detail, the diff
array of modifications defines only the base container for the detail view.
diff: /**SCHEMA_DIFF*/[
/* Base container for the detail view. */
{
"operation": "insert",
"name": "Detail",
"values": {
...
}
}
]/**SCHEMA_DIFF*/