Caplin Trader 5.1.0

Class: module:ct-workbench/messaging/RecordNode

module:ct-workbench/messaging/RecordNode(record, autoGenerateIntervalProperty)

new module:ct-workbench/messaging/RecordNode(record, autoGenerateIntervalProperty)

A PresentationNode that visually represents a record and allows the user to edit its data fields.

Extends:
Parameters:
Name Type Description
record module:ct-services/testing/RecordStub

The record stub that this PresentationModel represents

autoGenerateIntervalProperty module:br-presenter/property/Property

Property set to the number of milliseconds between updates.

Extends

Methods

addFieldNode(node)

Add the given field to the list of data fields.

Parameters:
Name Type Description
node module:br-presenter/node/Field

errorSelected()

User has selected an error state, so pass it to the RecordStub's setErrorType method and update the view accordingly.

initialiseFields()

Populate the fields NodeList with a list of br-presenter/node/Fields containing data from the RecordStub's field data.

send()

Create JSON object from the list of fields and their current values, and pass it to the RecordStub's setFieldData method.

toggleErrorsVisible()

Toggle visibility of the error state dropdown.

toggleExpanded()

Toggle the expanded view of the record, showing auto gen toggle, error state button, data fields, etc.

toJson()

Convert the fields NodeList to a JSON object.