Class
caplin.workbench.messaging

RecordNode

Extends .

Constructor Summary

Attributes Name and Description
caplin.workbench.messaging.RecordNode(caplin.services.testing.RecordStub record, caplin.presenter.property.Property autoGenerateIntervalProperty)

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

Method Summary

Attributes Name and Description
void addFieldNode(caplin.presenter.node.Field node)

Add the given field to the list of data fields.

void errorSelected()

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

void initialiseFields()

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

void send()

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

void toggleErrorsVisible()

Toggle visibility of the error state dropdown.

void toggleExpanded()

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

void toJson()

Convert the fields NodeList to a JSON object.

Constructor Detail

caplin.workbench.messaging.RecordNode(caplin.services.testing.RecordStub record, caplin.presenter.property.Property autoGenerateIntervalProperty)

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

Parameters
caplin.services.testing.RecordStub record The record stub that this PresentationModel represents
caplin.presenter.property.Property autoGenerateIntervalProperty Property set to the number of milliseconds between updates.

Method Detail

void addFieldNode(caplin.presenter.node.Field node)

Add the given field to the list of data fields.

Parameters
caplin.presenter.node.Field node

void errorSelected()

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

void initialiseFields()

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

void send()

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

void toggleErrorsVisible()

Toggle visibility of the error state dropdown.

void toggleExpanded()

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

void toJson()

Convert the fields NodeList to a JSON object.